allow to test login from server too

This commit is contained in:
ibizaman 2025-07-11 10:14:57 +02:00 committed by Pierre Penninckx
parent 2377140b0c
commit 8d85cbd1be

View file

@ -117,8 +117,16 @@ let
script = extraScript args;
in
lib.optionalString (script != "") script)
+ (optionalString (hasAttr "test" nodes.server && hasAttr "login" nodes.server.test) ''
with subtest("Login from server"):
code, logs = server.execute("login_playwright")
server.copy_from_vm("trace")
print(logs)
if code != 0:
raise Exception("login_playwright did not succeed")
'')
+ (optionalString (hasAttr "test" nodes.client && hasAttr "login" nodes.client.test) ''
with subtest("Login"):
with subtest("Login from client"):
code, logs = client.execute("login_playwright")
client.copy_from_vm("trace")
print(logs)