From 3c10691574f339ec998250dfe6c2c1937f16420a Mon Sep 17 00:00:00 2001 From: mnovak Date: Thu, 3 Dec 2026 09:44:50 +0100 Subject: [PATCH] [deploy] Calls: the VM test reads uclient's last count, its total --- deploy/nixos/test.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/nixos/test.nix b/deploy/nixos/test.nix index 667f01e..d0d7376 100644 --- a/deploy/nixos/test.nix +++ b/deploy/nixos/test.nix @@ -103,9 +103,10 @@ pkgs.testers.runNixOSTest { + creds["username"] + "' -w '{}' " + server_ip) out = client.succeed(uclient.format(creds["password"]) + " 2>&1") print(out) - sent = re.search(r"tot_recv_msgs=(\d+)", out) + # uclient prints its counts while it runs and once more at the end: the last one is the total. + received = re.findall(r"tot_recv_msgs=(\d+)", out) # The output goes into the message: Nix keeps only the last lines of a failed test's log. - assert sent and int(sent.group(1)) > 0, "no packet came back through coturn: " + out[-2500:] + assert received and int(received[-1]) > 0, "no packet came back through coturn: " + out[-2500:] refused = client.fail(uclient.format(b64(os.urandom(20))) + " 2>&1") assert "401" in refused, "a wrong password was not refused with 401: " + refused[-2500:]