diff options
author | kilianar <mail@kilianar.de> | 2022-07-19 16:39:13 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2022-07-19 19:05:20 +0200 |
commit | a3c5c5eec4f33c4917f9c420bf6411ebc7f704fc (patch) | |
tree | f2997d3be2edcd5453122e431ce126f6f27d6667 /nixos/tests/airsonic.nix | |
parent | 2543ab976c892bbdc5afe5bc05fbdbdce264803d (diff) |
nixosTests.airsonic: fix failure (type error)
airsonic_is_up should return a bool, but machine.succeed returns a string causing testScriptWithTypes to fail. This is fixed by executing the cmd with machine.execute and checking the status code.
Diffstat (limited to 'nixos/tests/airsonic.nix')
-rw-r--r-- | nixos/tests/airsonic.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/tests/airsonic.nix b/nixos/tests/airsonic.nix index 2f60c56f643be..69f979726bce4 100644 --- a/nixos/tests/airsonic.nix +++ b/nixos/tests/airsonic.nix @@ -15,7 +15,8 @@ import ./make-test-python.nix ({ pkgs, ... }: { testScript = '' def airsonic_is_up(_) -> bool: - return machine.succeed("curl --fail http://localhost:4040/login") + status, _ = machine.execute("curl --fail http://localhost:4040/login") + return status == 0 machine.start() |