about summary refs log tree commit diff
path: root/nixos/tests/airsonic.nix
diff options
context:
space:
mode:
authorkilianar <mail@kilianar.de>2022-07-19 16:39:13 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2022-07-19 19:05:20 +0200
commita3c5c5eec4f33c4917f9c420bf6411ebc7f704fc (patch)
treef2997d3be2edcd5453122e431ce126f6f27d6667 /nixos/tests/airsonic.nix
parent2543ab976c892bbdc5afe5bc05fbdbdce264803d (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.nix3
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()