nixos/tests/mihomo: implement check correctly, fix target value

This commit is contained in:
Peder Bergebakken Sundt
2024-10-02 11:18:29 +02:00
parent ed72e91db1
commit 93da11def1
+3 -1
View File
@@ -39,6 +39,8 @@ import ./make-test-python.nix ({ pkgs, ... }: {
machine.fail("curl --fail --max-time 10 --proxy socks5://user:supervillain@localhost:7890 http://localhost")
# Web UI
machine.succeed("curl --fail http://localhost:9090") == '{"hello":"clash"}'
result = machine.succeed("curl --fail http://localhost:9090")
target = '{"hello":"mihomo"}\n'
assert result == target, f"{result!r} != {target!r}"
'';
})