ipatests: fix test_idp

The test is calling su -c "sudo yum list yum" keycloakuser
to ensure that keycloakuser is allowed to execute the yum command.

On fedora 42 and above, the yum package does not exist any more.
Replace with a call to yum list sssd-client as the package
sssd-client is always installed on our test machines.

Fixes: https://pagure.io/freeipa/issue/9769
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
This commit is contained in:
Florence Blanc-Renaud authored and Sudhir Menon committed 2025-04-09 11:55:29 +05:30
1 parent f5084adb6d
commit e964b7de94
1 file changed
+1 -1
+1 -1
View File
@@ -217,7 +217,7 @@ class TestIDPKeycloak(IntegrationTest):
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 yum" keycloakuser'
test_sudo = 'su -c "sudo yum list sssd-client" 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