nixosTests.zeronet-conservancy: migrate to runTest

Part Of #386873

Changed files
+24 -23
nixos
+1 -1
nixos/tests/all-tests.nix
···
your_spotify = handleTest ./your_spotify.nix {};
zammad = handleTest ./zammad.nix {};
zenohd = handleTest ./zenohd.nix {};
-
zeronet-conservancy = handleTest ./zeronet-conservancy.nix {};
zfs = handleTest ./zfs.nix {};
zigbee2mqtt_1 = runTest {
imports = [ ./zigbee2mqtt.nix ];
···
your_spotify = handleTest ./your_spotify.nix {};
zammad = handleTest ./zammad.nix {};
zenohd = handleTest ./zenohd.nix {};
+
zeronet-conservancy = runTest ./zeronet-conservancy.nix;
zfs = handleTest ./zfs.nix {};
zigbee2mqtt_1 = runTest {
imports = [ ./zigbee2mqtt.nix ];
+23 -22
nixos/tests/zeronet-conservancy.nix
···
let
port = 43110;
in
-
import ./make-test-python.nix (
-
{ pkgs, ... }:
-
{
-
name = "zeronet-conservancy";
-
meta = with pkgs.lib.maintainers; {
-
maintainers = [ fgaz ];
-
};
-
nodes.machine =
-
{ config, pkgs, ... }:
-
{
-
services.zeronet = {
-
enable = true;
-
package = pkgs.zeronet-conservancy;
-
inherit port;
-
};
};
-
testScript = ''
-
machine.wait_for_unit("zeronet.service")
-
machine.wait_for_open_port(${toString port})
-
machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats")
-
'';
-
}
-
)
···
+
{
+
lib,
+
...
+
}:
let
port = 43110;
in
+
{
+
name = "zeronet-conservancy";
+
meta = with lib.maintainers; {
+
maintainers = [ fgaz ];
+
};
+
nodes.machine =
+
{ pkgs, ... }:
+
{
+
services.zeronet = {
+
enable = true;
+
package = pkgs.zeronet-conservancy;
+
inherit port;
};
+
};
+
testScript = ''
+
machine.wait_for_unit("zeronet.service")
+
machine.wait_for_open_port(${toString port})
+
machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats")
+
'';
+
}