ipatests: commands: Wait for the SSSD to become available

Previous test to test_ssh_key_connection is calling ipa-server-upgrade command,
which restarts all the associated services.
Especially on slower machine, SSSD is not yet online when the SSH connection is attempted.
This results to only cached users being available.
Wait for SSSD to become available before the SSH connection is attempted.

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

Signed-off-by: Michal Polovka <mpolovka@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Julien Rische <jrische@redhat.com>
This commit is contained in:
Michal Polovka 2023-05-10 14:00:03 +02:00
parent 72cc53a22e
commit abf1dc557e
No known key found for this signature in database
GPG Key ID: 4934889DC424FE12

View File

@ -645,6 +645,9 @@ class TestIPACommand(IntegrationTest):
(datetime.now() - timedelta(seconds=10)).timetuple() (datetime.now() - timedelta(seconds=10)).timetuple()
) )
# Wait for sssd to be back online, hence test-user to become available
tasks.wait_for_sssd_domain_status_online(self.master)
tasks.run_ssh_cmd( tasks.run_ssh_cmd(
to_host=self.master.external_hostname, username=test_user, to_host=self.master.external_hostname, username=test_user,
auth_method="key", private_key_path=first_priv_key_path auth_method="key", private_key_path=first_priv_key_path