Skip to content

Commit

Permalink
test: support testing on versions Cockpit < 329
Browse files Browse the repository at this point in the history
With the release of Cockpit 329 the add host dialog now warns the user
before adding a remote host. Cockpit's testlib add host helper function
defaults to this behaviour but our test images still have an older
version of Cockpit installed.
  • Loading branch information
jelly committed Nov 25, 2024
1 parent 85d7a18 commit a6bf6b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/check-machines-multi-host-consoles
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ class TestMultiMachineVNC(VirtualMachinesCase):
self.goToVmPage(name)
b.wait_in_text(f"#vm-{name}-system-state", "Running")

b.add_machine(m2_host, known_host=True, password=None)
# Cockpit 329 warns the user before adding a remote host
cockpit_version = m.execute("cockpit-bridge --version | head -n 1 | awk '{ print $2 }'").strip()
b.add_machine(m2_host, known_host=True, password=None, expect_warning=cockpit_version > "328")

b.switch_to_top()
b.click("#hosts-sel button")
Expand Down

0 comments on commit a6bf6b4

Please sign in to comment.