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