nixpkgs/nixos/tests/zeronet-conservancy.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
553 B
Nix
Raw Permalink Normal View History

{
lib,
...
}:
2022-06-10 14:54:16 +02:00
let
port = 43110;
in
{
name = "zeronet-conservancy";
meta = with lib.maintainers; {
maintainers = [ fgaz ];
};
2022-06-10 14:54:16 +02:00
nodes.machine =
{ pkgs, ... }:
{
services.zeronet = {
enable = true;
package = pkgs.zeronet-conservancy;
inherit port;
};
};
testScript = ''
machine.wait_for_unit("zeronet.service")
2022-06-10 14:54:16 +02:00
machine.wait_for_open_port(${toString port})
2022-06-10 14:54:16 +02:00
machine.succeed("curl --fail -H 'Accept: text/html, application/xml, */*' localhost:${toString port}/Stats")
'';
}