1let
2 defaultPort = 8080;
3 customPort = 4242;
4in
5import ./make-test-python.nix ({ pkgs, ... }: {
6 name = "podgrab";
7
8 nodes = {
9 default = { ... }: {
10 services.podgrab.enable = true;
11 };
12
13 customized = { ... }: {
14 services.podgrab = {
15 enable = true;
16 port = customPort;
17 };
18 };
19 };
20
21 testScript = ''
22 start_all()
23
24 default.wait_for_unit("podgrab")
25 default.wait_for_open_port(${toString defaultPort})
26 default.succeed("curl --fail http://localhost:${toString defaultPort}")
27
28 customized.wait_for_unit("podgrab")
29 customized.wait_for_open_port(${toString customPort})
30 customized.succeed("curl --fail http://localhost:${toString customPort}")
31 '';
32
33 meta.maintainers = with pkgs.lib.maintainers; [ ambroisie ];
34})