at 23.11-beta 639 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: let 2 testPort = 8108; 3in { 4 name = "typesense"; 5 meta.maintainers = with pkgs.lib.maintainers; [ oddlama ]; 6 7 nodes.machine = { ... }: { 8 services.typesense = { 9 enable = true; 10 apiKeyFile = pkgs.writeText "typesense-api-key" "dummy"; 11 settings.server = { 12 api-port = testPort; 13 api-address = "0.0.0.0"; 14 }; 15 }; 16 }; 17 18 testScript = '' 19 machine.wait_for_unit("typesense.service") 20 machine.wait_for_open_port(${toString testPort}) 21 assert machine.succeed("curl --fail http://localhost:${toString testPort}/health") == '{"ok":true}' 22 ''; 23})