1import ./make-test-python.nix (
2 { pkgs, ... }:
3 let
4 port = 3001;
5 in
6 {
7 name = "flood";
8 meta = {
9 maintainers = with pkgs.lib.maintainers; [ thiagokokada ];
10 };
11
12 nodes.machine =
13 { pkgs, ... }:
14 {
15 services.flood = {
16 inherit port;
17 enable = true;
18 openFirewall = true;
19 extraArgs = [ "--baseuri=/" ];
20 };
21 };
22
23 testScript = # python
24 ''
25 machine.start()
26 machine.wait_for_unit("flood.service")
27 machine.wait_for_open_port(${toString port})
28
29 machine.succeed("curl --fail http://localhost:${toString port}")
30 '';
31 }
32)