diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 829a5a645971..b583e3b390c3 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1304,7 +1304,7 @@ in { your_spotify = handleTest ./your_spotify.nix {}; zammad = handleTest ./zammad.nix {}; zenohd = handleTest ./zenohd.nix {}; - zeronet-conservancy = handleTest ./zeronet-conservancy.nix {}; + zeronet-conservancy = runTest ./zeronet-conservancy.nix; zfs = handleTest ./zfs.nix {}; zigbee2mqtt_1 = runTest { imports = [ ./zigbee2mqtt.nix ]; diff --git a/nixos/tests/zeronet-conservancy.nix b/nixos/tests/zeronet-conservancy.nix index 1c906d80a317..674712e3fe6a 100644 --- a/nixos/tests/zeronet-conservancy.nix +++ b/nixos/tests/zeronet-conservancy.nix @@ -1,30 +1,31 @@ +{ + lib, + ... +}: let port = 43110; in -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "zeronet-conservancy"; - meta = with pkgs.lib.maintainers; { - maintainers = [ fgaz ]; +{ + name = "zeronet-conservancy"; + meta = with lib.maintainers; { + maintainers = [ fgaz ]; + }; + + nodes.machine = + { pkgs, ... }: + { + services.zeronet = { + enable = true; + package = pkgs.zeronet-conservancy; + inherit port; + }; }; - nodes.machine = - { config, pkgs, ... }: - { - services.zeronet = { - enable = true; - package = pkgs.zeronet-conservancy; - inherit port; - }; - }; + testScript = '' + machine.wait_for_unit("zeronet.service") - testScript = '' - machine.wait_for_unit("zeronet.service") + machine.wait_for_open_port(${toString port}) - machine.wait_for_open_port(${toString port}) - - machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats") - ''; - } -) + machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats") + ''; +}