nixos/mihomo: fix option type and test (#345891)

This commit is contained in:
Peder Bergebakken Sundt
2024-10-19 06:58:41 +02:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ in
package = lib.mkPackageOption pkgs "mihomo" { };
configFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
type = lib.types.path;
description = "Configuration file to use.";
};
+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}"
'';
})