mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
5803706662
Fix some fallout from de3e423
(PR #171280).
35 lines
759 B
Nix
35 lines
759 B
Nix
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")
|
|
default.wait_for_open_port(defaultPort)
|
|
default.succeed("curl --fail http://localhost:${toString defaultPort}")
|
|
|
|
customized.wait_for_unit("podgrab")
|
|
customized.wait_for_open_port(customPort)
|
|
customized.succeed("curl --fail http://localhost:${toString customPort}")
|
|
'';
|
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ ambroisie ];
|
|
})
|