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