Skip to content

Commit

Permalink
test: Factorize cockpit-ws startup in TestClient
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpitt authored and allisonkarlitskaya committed Sep 29, 2023
1 parent d9f988f commit 61c14cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/verify/check-client
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,16 @@ Command = /usr/bin/env python3 -m cockpit.beiboot
timeout=30)

def testBeibootNoBridge(self):
self.m_client.spawn(f"runuser -u admin -- {self.libexecdir}/cockpit-ws --no-tls", "ws.log")
# set up target machine: no cockpit
self.m_target.execute("rm /usr/bin/cockpit-bridge; rm -r /usr/share/cockpit")

self.checkLoginScenarios(local_bridge=False)

def testBeibootWithBridge(self):
self.m_client.spawn(f"runuser -u admin -- {self.libexecdir}/cockpit-ws --no-tls", "ws.log")
self.checkLoginScenarios(local_bridge=True)

def checkLoginScenarios(self, *, local_bridge=True):
self.m_client.spawn(f"runuser -u admin -- {self.libexecdir}/cockpit-ws --no-tls", "ws.log")

b = self.browser
b.open("/")

Expand Down

0 comments on commit 61c14cb

Please sign in to comment.