Skip to content

Commit

Permalink
ipatests: test_idp fails calling yum list wget
Browse files Browse the repository at this point in the history
On rawhide, the package wget has been replaced with wget2
(more info in https://bugzilla.redhat.com/show_bug.cgi?id=2254790).

The test test_idp is checking that the sudo command is working
for a keycloak user, by creating a sudo rule for the yum command
and calling sudo yum list wget.
As the wget package does not exist any more on Rawhide, the command
returns an error:
Error: No matching Packages to list
and the test fails.

Replace the call "sudo yum list wget" with a call to "sudo yum list yum"
as the yum package is always present.

Fixes: https://pagure.io/freeipa/issue/9522

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
  • Loading branch information
flo-renaud committed Jan 30, 2024
1 parent 677d308 commit 9c470d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipatests/test_integration/test_idp.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def test_auth_sudo_idp(self):
assert "User keycloakuser may run the following commands" in test
assert "/usr/bin/yum" in test
kinit_idp(self.client, 'keycloakuser', self.client)
test_sudo = 'su -c "sudo yum list wget" keycloakuser'
test_sudo = 'su -c "sudo yum list yum" keycloakuser'
self.client.run_command(test_sudo)
list_fail = self.master.run_command(cmd).stdout_text
assert "User keycloakuser is not allowed to run sudo" in list_fail
Expand Down

0 comments on commit 9c470d1

Please sign in to comment.