mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix grp import for mac in test_user integration test
This commit is contained in:
parent
10124034cb
commit
585ee9db90
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue