gracefully handle cases where no trace is found

This commit is contained in:
ibizaman 2025-07-11 17:28:43 +02:00 committed by Pierre Penninckx
parent 82977bd239
commit 7efc153706

View file

@ -120,7 +120,10 @@ let
+ (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")
try:
server.copy_from_vm("trace")
except:
print("No trace found on server")
print(logs)
if code != 0:
raise Exception("login_playwright did not succeed")
@ -128,7 +131,10 @@ let
+ (optionalString (hasAttr "test" nodes.client && hasAttr "login" nodes.client.test) ''
with subtest("Login from client"):
code, logs = client.execute("login_playwright")
client.copy_from_vm("trace")
try:
server.copy_from_vm("trace")
except:
print("No trace found on client")
print(logs)
if code != 0:
raise Exception("login_playwright did not succeed")