at 23.11-pre 589 B view raw
1import ./make-test-python.nix ({ lib, pkgs, ... }: 2 3 4let 5 port = 3333; 6in 7{ 8 name = "convos"; 9 meta.maintainers = with lib.maintainers; [ sgo ]; 10 11 nodes = { 12 machine = 13 { pkgs, ... }: 14 { 15 services.convos = { 16 enable = true; 17 listenPort = port; 18 }; 19 }; 20 }; 21 22 testScript = '' 23 machine.wait_for_unit("convos") 24 machine.wait_for_open_port(${toString port}) 25 machine.succeed("journalctl -u convos | grep -q 'application available at.*${toString port}'") 26 machine.succeed("curl -f http://localhost:${toString port}/") 27 ''; 28})