1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/tests/zeronet-conservancy.nix

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

31 lines
639 B
Nix
Raw Normal View History

2022-06-10 13:54:16 +01:00
let
port = 43110;
in
import ./make-test-python.nix (
{ pkgs, ... }:
{
name = "zeronet-conservancy";
meta = with pkgs.lib.maintainers; {
maintainers = [ fgaz ];
};
nodes.machine =
{ config, pkgs, ... }:
{
2022-06-10 13:54:16 +01:00
services.zeronet = {
enable = true;
package = pkgs.zeronet-conservancy;
inherit port;
};
};
2022-06-10 13:54:16 +01:00
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")
'';
}
)