diff --git a/tests/integration/shell/test_auth.py b/tests/integration/shell/test_auth.py index fc80c7ac05..c0d1c7fdd1 100644 --- a/tests/integration/shell/test_auth.py +++ b/tests/integration/shell/test_auth.py @@ -59,12 +59,18 @@ class AuthTest(ShellCase): def setUp(self): for user in (self.userA, self.userB): try: + if salt.utils.is_darwin() and user not in str(self.run_call('user.list_users')): + # workaround for https://github.com/saltstack/salt-jenkins/issues/504 + raise KeyError pwd.getpwnam(user) except KeyError: self.run_call('user.add {0} createhome=False'.format(user)) # only put userB into the group for the group auth test try: + if salt.utils.is_darwin() and self.group not in str(self.run_call('group.info {0}'.format(self.group))): + # workaround for https://github.com/saltstack/salt-jenkins/issues/504 + raise KeyError grp.getgrnam(self.group) except KeyError: self.run_call('group.add {0}'.format(self.group))