We don't really need the sudo check

This commit is contained in:
Pedro Algarvio 2020-05-22 08:03:31 +01:00 committed by Daniel Wozniak
parent a0ba844978
commit 690e859091

View file

@ -540,8 +540,6 @@ class CMDModuleTest(ModuleCase):
user = RUNTIME_VARS.RUNTIME_CONFIGS["master"]["user"]
else:
user = salt.utils.user.get_specific_user()
if user.startswith("sudo_"):
user = user.split("sudo_")[-1]
cmd = self.run_function("cmd.run", ["whoami"])
self.assertEqual(user.lower(), cmd.lower())