at 25.11-pre 646 B view raw
1import ./make-test-python.nix ( 2 { pkgs, lib, ... }: 3 4 let 5 port = 1234; 6 in 7 { 8 name = "mollysocket"; 9 meta.maintainers = with lib.maintainers; [ dotlambda ]; 10 11 nodes.mollysocket = 12 { ... }: 13 { 14 services.mollysocket = { 15 enable = true; 16 settings = { 17 inherit port; 18 }; 19 }; 20 }; 21 22 testScript = '' 23 mollysocket.wait_for_unit("mollysocket.service") 24 mollysocket.wait_for_open_port(${toString port}) 25 26 out = mollysocket.succeed("curl --fail http://127.0.0.1:${toString port}") 27 assert "Version ${pkgs.mollysocket.version}" in out 28 ''; 29 } 30)