blob: dc9dfebaf49bd9dbc55b38aecbceb36e6b4d67d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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(${toString defaultPort})
default.succeed("curl --fail http://localhost:${toString defaultPort}")
customized.wait_for_unit("podgrab")
customized.wait_for_open_port(${toString customPort})
customized.succeed("curl --fail http://localhost:${toString customPort}")
'';
meta.maintainers = with pkgs.lib.maintainers; [ ambroisie ];
})
|