at 25.11-pre 1.1 kB view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 let 4 port = 81; 5 in 6 { 7 name = "keter"; 8 meta = with pkgs.lib.maintainers; { 9 maintainers = [ jappie ]; 10 }; 11 12 nodes.machine = 13 { config, pkgs, ... }: 14 { 15 services.keter = { 16 enable = true; 17 18 globalKeterConfig = { 19 cli-port = 123; # just adding this to test the freeform 20 listeners = [ 21 { 22 host = "*4"; 23 inherit port; 24 } 25 ]; 26 }; 27 bundle = { 28 appName = "test-bundle"; 29 domain = "localhost"; 30 executable = pkgs.writeShellScript "run" '' 31 ${pkgs.python3}/bin/python -m http.server $PORT 32 ''; 33 }; 34 }; 35 }; 36 37 testScript = '' 38 machine.wait_for_unit("keter.service") 39 40 machine.wait_for_open_port(${toString port}) 41 machine.wait_for_console_text("Activating app test-bundle with hosts: localhost") 42 43 44 machine.succeed("curl --fail http://localhost:${toString port}/") 45 ''; 46 } 47)