[deploy] Calls: the VM test reads uclient's last count, its total
This commit is contained in:
@@ -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:]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user