From 1b15845c974f9aa9fd1b2a45c309f2bb9e6899ad Mon Sep 17 00:00:00 2001 From: mnovak Date: Thu, 3 Dec 2026 09:56:20 +0100 Subject: [PATCH] [deploy] Calls: the VM test takes uclient's refusal in either of its words --- deploy/nixos/test.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/nixos/test.nix b/deploy/nixos/test.nix index d0d7376..4a12d76 100644 --- a/deploy/nixos/test.nix +++ b/deploy/nixos/test.nix @@ -108,7 +108,10 @@ pkgs.testers.runNixOSTest { # The output goes into the message: Nix keeps only the last lines of a failed test's log. 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:] + # The same command with the right password just worked, so the refusal is the password's. uclient says so as + # `error 401`, or, when it keeps answering the challenge, `Cannot complete Allocation`. + assert "error 401" in refused or "Cannot complete Allocation" in refused, ( + "a wrong password was not refused: " + refused[-2500:]) assert call("GET", "/v0/mailboxes/" + mid + "/blobs?wait=1", token=fetch) == "200" # Refusals: a wrong token, a malformed id, a body that is not JSON.