depot/third_party/nixpkgs/nixos/tests/zeronet-conservancy.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

25 lines
575 B
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")
'';
})