Merge pull request #48584 from Ch3LL/mac_user_grp

Fix grp import for mac in test_user integration test
This commit is contained in:
Nicole Thomas 2018-07-16 15:28:12 -04:00 committed by GitHub
commit 5391dd0a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,11 @@ from tests.support.mixins import SaltReturnAssertsMixin
# Import salt libs
import salt.utils
try:
import grp
except ImportError:
grp = None
if salt.utils.is_darwin():
USER = 'macuser'
GROUP = 'macuser'
@ -32,13 +37,11 @@ elif salt.utils.is_windows():
GROUP = 'winuser'
GID = randint(400, 500)
NOGROUPGID = randint(400, 500)
grp = None
else:
USER = 'nobody'
GROUP = 'nobody'
GID = 'nobody'
NOGROUPGID = 'nogroup'
import grp
@destructiveTest