Skip to content

Commit

Permalink
Fixup new groupadd tests for syntax change in 2016.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rallytime committed Jun 8, 2016
1 parent c5b4ec0 commit 595d4f2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/unit/modules/groupadd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ def test_adduser(self):
'''
os_version_list = [
{'grains': {'kernel': 'Linux', 'os_family': 'RedHat', 'osmajorrelease': '5'},
'cmd': 'gpasswd -a root test'},
'cmd': ('gpasswd', '-a', 'root', 'test')},

{'grains': {'kernel': 'Linux', 'os_family': 'Suse', 'osrelease_info': [11, 2]},
'cmd': 'usermod -A test root'},
'cmd': ('usermod', '-A', 'test', 'root')},

{'grains': {'kernel': 'Linux'},
'cmd': 'gpasswd --add root test'},
'cmd': ('gpasswd', '--add', 'root', 'test')},

{'grains': {'kernel': 'OTHERKERNEL'},
'cmd': 'usermod -G test root'},
'cmd': ('usermod', '-G', 'test', 'root')},
]

for os_version in os_version_list:
Expand All @@ -141,13 +141,13 @@ def test_deluser(self):
'''
os_version_list = [
{'grains': {'kernel': 'Linux', 'os_family': 'RedHat', 'osmajorrelease': '5'},
'cmd': 'gpasswd -d root test'},
'cmd': ('gpasswd', '-d', 'root', 'test')},

{'grains': {'kernel': 'Linux', 'os_family': 'Suse', 'osrelease_info': [11, 2]},
'cmd': 'usermod -R test root'},
'cmd': ('usermod', '-R', 'test', 'root')},

{'grains': {'kernel': 'Linux'},
'cmd': 'gpasswd --del root test'},
'cmd': ('gpasswd', '--del', 'root', 'test')},

{'grains': {'kernel': 'OpenBSD'},
'cmd': 'usermod -S foo root'},
Expand Down Expand Up @@ -176,13 +176,13 @@ def test_members(self):
'''
os_version_list = [
{'grains': {'kernel': 'Linux', 'os_family': 'RedHat', 'osmajorrelease': '5'},
'cmd': "gpasswd -M foo test"},
'cmd': ('gpasswd', '-M', 'foo', 'test')},

{'grains': {'kernel': 'Linux', 'os_family': 'Suse', 'osrelease_info': [11, 2]},
'cmd': 'groupmod -A foo test'},
'cmd': ('groupmod', '-A', 'foo', 'test')},

{'grains': {'kernel': 'Linux'},
'cmd': 'gpasswd --members foo test'},
'cmd': ('gpasswd', '--members', 'foo', 'test')},

{'grains': {'kernel': 'OpenBSD'},
'cmd': 'usermod -G test foo'},
Expand Down

0 comments on commit 595d4f2

Please sign in to comment.