allow to test login from server too
This commit is contained in:
parent
db41c85dc3
commit
1bd16da9d9
1 changed files with 9 additions and 1 deletions
|
|
@ -117,8 +117,16 @@ let
|
||||||
script = extraScript args;
|
script = extraScript args;
|
||||||
in
|
in
|
||||||
lib.optionalString (script != "") script)
|
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) ''
|
+ (optionalString (hasAttr "test" nodes.client && hasAttr "login" nodes.client.test) ''
|
||||||
with subtest("Login"):
|
with subtest("Login from client"):
|
||||||
code, logs = client.execute("login_playwright")
|
code, logs = client.execute("login_playwright")
|
||||||
client.copy_from_vm("trace")
|
client.copy_from_vm("trace")
|
||||||
print(logs)
|
print(logs)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue