Skip to content

Commit

Permalink
test: Fix waiting for IdM user
Browse files Browse the repository at this point in the history
First wait for the realm user to exist before using it in chown. D'oh!
  • Loading branch information
martinpitt committed Nov 15, 2023
1 parent ff0c229 commit fdca31b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/verify/check-system-realms
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ class CommonTests:
m.execute("! su -c klist " + self.admin_user)
b.logout()

# change existing local "admin" home dir to domain "admin" user
m.execute(f"chown -R {self.admin_user}@cockpit.lan /home/admin")

# wait until IPA user works
m.execute('while ! su - -c "echo %s | sudo -S true" %s@cockpit.lan; do sleep 5; sss_cache -E || true; systemctl try-restart sssd; done' % (
self.admin_password, self.admin_user), timeout=300)

# change existing local "admin" home dir to domain "admin" user
m.execute(f"chown -R {self.admin_user}@cockpit.lan /home/admin")

# log in as domain admin and check that we can do privileged operations
b.login_and_go('/system/services#/systemd-tmpfiles-clean.timer', user=f'{self.admin_user}@cockpit.lan', password=self.admin_password)
b.wait_in_text("#statuses", "Running")
Expand Down

0 comments on commit fdca31b

Please sign in to comment.