nixosTests.zeronet-conservancy: migrate to runTest

Part Of #386873

+24 -23
+1 -1
nixos/tests/all-tests.nix
··· 1304 1304 your_spotify = handleTest ./your_spotify.nix {}; 1305 1305 zammad = handleTest ./zammad.nix {}; 1306 1306 zenohd = handleTest ./zenohd.nix {}; 1307 - zeronet-conservancy = handleTest ./zeronet-conservancy.nix {}; 1307 + zeronet-conservancy = runTest ./zeronet-conservancy.nix; 1308 1308 zfs = handleTest ./zfs.nix {}; 1309 1309 zigbee2mqtt_1 = runTest { 1310 1310 imports = [ ./zigbee2mqtt.nix ];
+23 -22
nixos/tests/zeronet-conservancy.nix
··· 1 + { 2 + lib, 3 + ... 4 + }: 1 5 let 2 6 port = 43110; 3 7 in 4 - import ./make-test-python.nix ( 5 - { pkgs, ... }: 6 - { 7 - name = "zeronet-conservancy"; 8 - meta = with pkgs.lib.maintainers; { 9 - maintainers = [ fgaz ]; 10 - }; 8 + { 9 + name = "zeronet-conservancy"; 10 + meta = with lib.maintainers; { 11 + maintainers = [ fgaz ]; 12 + }; 11 13 12 - nodes.machine = 13 - { config, pkgs, ... }: 14 - { 15 - services.zeronet = { 16 - enable = true; 17 - package = pkgs.zeronet-conservancy; 18 - inherit port; 19 - }; 14 + nodes.machine = 15 + { pkgs, ... }: 16 + { 17 + services.zeronet = { 18 + enable = true; 19 + package = pkgs.zeronet-conservancy; 20 + inherit port; 20 21 }; 22 + }; 21 23 22 - testScript = '' 23 - machine.wait_for_unit("zeronet.service") 24 + testScript = '' 25 + machine.wait_for_unit("zeronet.service") 24 26 25 - machine.wait_for_open_port(${toString port}) 27 + machine.wait_for_open_port(${toString port}) 26 28 27 - machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats") 28 - ''; 29 - } 30 - ) 29 + machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats") 30 + ''; 31 + }