diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2022-06-10 14:54:16 +0200 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2022-06-18 22:06:55 +0200 |
commit | 3cfdd35ff6f3debac56261d35c06537697e8fe98 (patch) | |
tree | 2ca52ae6367fb97152bdd45864a7f0c0ae7ec93c /nixos/tests/zeronet-conservancy.nix | |
parent | 67eb7a1d55171c64c81602ebc94696739a9a8862 (diff) |
zeronet-conservancy: add nixos test
Diffstat (limited to 'nixos/tests/zeronet-conservancy.nix')
-rw-r--r-- | nixos/tests/zeronet-conservancy.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/tests/zeronet-conservancy.nix b/nixos/tests/zeronet-conservancy.nix new file mode 100644 index 0000000000000..8cb649cbdaabc --- /dev/null +++ b/nixos/tests/zeronet-conservancy.nix @@ -0,0 +1,25 @@ +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") + ''; +}) |