Skip to content

Commit

Permalink
test: Fix race condition in TestLogin.testBasic
Browse files Browse the repository at this point in the history
Wait until the /system page has loaded, instead of immediately logging
out after logging in. It may otherwise happen that the
JavaScript/websocket parts haven't initialized yet, and the `cockpit`
object isn't available yet.

Closes #14626
  • Loading branch information
martinpitt authored Sep 16, 2020
1 parent b78f1ad commit c042d8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/verify/check-login
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ account required pam_succeed_if.so user ingroup %s""" % m.get_admin_group
if not m.image.startswith("rhel") and not m.image.startswith("centos"): # no tcsh in RHEL
m.execute("sed -r -i.bak '/^admin:/ s_:[^:]+$_:/bin/tcsh_' /etc/passwd")
b.login_and_go()
b.enter_page('/system')
b.wait_visible('.system-information')
b.logout()
m.execute("mv /etc/passwd.bak /etc/passwd")

Expand Down

0 comments on commit c042d8a

Please sign in to comment.