diff options
author | Tomas Babej <tbabej@redhat.com> | 2014-05-15 15:13:47 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-06-25 20:14:52 +0200 |
commit | e0fd2695ca3c1c2df8bbecadd4597ccf0aeca004 (patch) | |
tree | d37ea3d75459abfa554cfeb9659f57cccff52903 /ipatests/test_integration/test_sudo.py | |
parent | ec2050b7dfa94ef5ce41172a98c9153c14d4c972 (diff) | |
download | freeipa-e0fd2695ca3c1c2df8bbecadd4597ccf0aeca004.tar.gz freeipa-e0fd2695ca3c1c2df8bbecadd4597ccf0aeca004.tar.xz freeipa-e0fd2695ca3c1c2df8bbecadd4597ccf0aeca004.zip |
ipatests: test_sudo: Fix assertions not assuming runasgroupcat set to ALL
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipatests/test_integration/test_sudo.py')
-rw-r--r-- | ipatests/test_integration/test_sudo.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ipatests/test_integration/test_sudo.py b/ipatests/test_integration/test_sudo.py index 3c7e6bdb3..e4ff2ae86 100644 --- a/ipatests/test_integration/test_sudo.py +++ b/ipatests/test_integration/test_sudo.py @@ -143,10 +143,10 @@ class TestSudo(IntegrationTest): def test_add_sudo_rule(self): result1 = self.list_sudo_commands("testuser1") - assert "(ALL) NOPASSWD: ALL" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result1.stdout_text result2 = self.list_sudo_commands("testuser2") - assert "(ALL) NOPASSWD: ALL" in result2.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result2.stdout_text def test_sudo_rule_restricted_to_one_user_setup(self): # Configure the rule to not apply to anybody @@ -161,7 +161,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_one_user(self): result1 = self.list_sudo_commands("testuser1") - assert "(ALL) NOPASSWD: ALL" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result1.stdout_text result2 = self.list_sudo_commands("testuser2", raiseonerr=False) assert result2.returncode != 0 @@ -187,7 +187,7 @@ class TestSudo(IntegrationTest): assert result1.returncode != 0 result2 = self.list_sudo_commands("testuser2") - assert "(ALL) NOPASSWD: ALL" in result2.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result2.stdout_text def test_setting_category_to_all_with_valid_entries_user_group(self): result = self.reset_rule_categories(safe_delete=False) @@ -207,7 +207,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_one_local_user(self): result1 = self.list_sudo_commands("localuser") - assert "(ALL) NOPASSWD: ALL" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result1.stdout_text result2 = self.list_sudo_commands("testuser1", raiseonerr=False) assert result2.returncode != 0 @@ -259,7 +259,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_one_host(self): result1 = self.list_sudo_commands("testuser1", raiseonerr=False) - assert "(ALL) NOPASSWD: ALL" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result1.stdout_text def test_setting_category_to_all_with_valid_entries_host(self): result = self.reset_rule_categories(safe_delete=False) @@ -279,7 +279,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_one_hostgroup(self): result1 = self.list_sudo_commands("testuser1") - assert "(ALL) NOPASSWD: ALL" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result1.stdout_text def test_setting_category_to_all_with_valid_entries_host_group(self): result = self.reset_rule_categories(safe_delete=False) @@ -300,7 +300,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_one_hostmask(self): result1 = self.list_sudo_commands("testuser1") - assert "(ALL) NOPASSWD: ALL" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD: ALL" in result1.stdout_text def test_setting_category_to_all_with_valid_entries_host_mask(self): result = self.reset_rule_categories(safe_delete=False) @@ -347,7 +347,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_one_command(self): result1 = self.list_sudo_commands("testuser1") - assert "(ALL) NOPASSWD: /usr/bin/yum" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD: /usr/bin/yum" in result1.stdout_text def test_sudo_rule_restricted_to_command_and_command_group_setup(self): # Add the readers command group to the rule @@ -357,7 +357,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_command_and_command_group(self): result1 = self.list_sudo_commands("testuser1") - assert "(ALL) NOPASSWD:" in result1.stdout_text + assert "(ALL : ALL) NOPASSWD:" in result1.stdout_text assert "/usr/bin/yum" in result1.stdout_text assert "/usr/bin/tail" in result1.stdout_text assert "/usr/bin/cat" in result1.stdout_text |