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