diff options
author | Lenka Doudova <ldoudova@redhat.com> | 2016-10-05 14:25:01 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-07 12:39:06 +0100 |
commit | e3b7d235d5e59e496f3d99a05e3dd379f845e4ea (patch) | |
tree | 46b6e2d81152447ee90b46a5fd5bf6ffb4aad1af /ipatests/test_integration | |
parent | 41098e3f7bb517f7445ed34d555bc3fb2083c6ce (diff) | |
download | freeipa-e3b7d235d5e59e496f3d99a05e3dd379f845e4ea.tar.gz freeipa-e3b7d235d5e59e496f3d99a05e3dd379f845e4ea.tar.xz freeipa-e3b7d235d5e59e496f3d99a05e3dd379f845e4ea.zip |
Tests: Fix integration sudo test
Tests with sudorules using only RunAsGroups attributes with empty RunAsUsers
attribute fail due to different expected value than is really returned. This is
caused by improper behaviour of sudo in versions before 1.8.18 (see [1]), to
which the tests were originally fitted. Changing the expected value to proper
one.
[1] - https://www.sudo.ws/pipermail/sudo-workers/2016-November/001025.html
https://fedorahosted.org/freeipa/ticket/6378
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Diffstat (limited to 'ipatests/test_integration')
-rw-r--r-- | ipatests/test_integration/test_sudo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipatests/test_integration/test_sudo.py b/ipatests/test_integration/test_sudo.py index a1676a28a..1fbdee3f6 100644 --- a/ipatests/test_integration/test_sudo.py +++ b/ipatests/test_integration/test_sudo.py @@ -530,7 +530,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_running_as_single_group(self): result1 = self.list_sudo_commands("testuser1", verbose=True) - assert "RunAsUsers: root" in result1.stdout_text + assert "RunAsUsers: testuser1" in result1.stdout_text assert "RunAsGroups: testgroup2" in result1.stdout_text def test_setting_category_to_all_with_valid_entries_runasgroup(self): @@ -551,7 +551,7 @@ class TestSudo(IntegrationTest): def test_sudo_rule_restricted_to_running_as_single_local_group(self): result1 = self.list_sudo_commands("testuser1", verbose=True) - assert "RunAsUsers: root" in result1.stdout_text + assert "RunAsUsers: testuser1" in result1.stdout_text assert "RunAsGroups: localgroup" in result1.stdout_text def test_setting_category_to_all_with_valid_entries_runasgroup_local(self): |