2021-04-14 17:15:41 +00:00
|
|
|
let
|
|
|
|
defaultPort = 8080;
|
|
|
|
customPort = 4242;
|
|
|
|
in
|
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
|
|
name = "podgrab";
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
default = { ... }: {
|
|
|
|
services.podgrab.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
customized = { ... }: {
|
|
|
|
services.podgrab = {
|
|
|
|
enable = true;
|
|
|
|
port = customPort;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
default.wait_for_unit("podgrab")
|
2022-07-20 19:58:10 +00:00
|
|
|
default.wait_for_open_port(${toString defaultPort})
|
2021-04-14 17:15:41 +00:00
|
|
|
default.succeed("curl --fail http://localhost:${toString defaultPort}")
|
|
|
|
|
|
|
|
customized.wait_for_unit("podgrab")
|
2022-07-20 19:58:10 +00:00
|
|
|
customized.wait_for_open_port(${toString customPort})
|
2021-04-14 17:15:41 +00:00
|
|
|
customized.succeed("curl --fail http://localhost:${toString customPort}")
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ ambroisie ];
|
|
|
|
})
|