diff options
author | oddlama <oddlama@oddlama.org> | 2023-07-19 00:29:30 +0200 |
---|---|---|
committer | oddlama <oddlama@oddlama.org> | 2023-07-22 16:38:13 +0200 |
commit | 234dd85da0ff4e1bb263adfe035157a0570b1a2e (patch) | |
tree | 4998d4e9c1046c10c4304bb95f7f410cc8ccc1fa /nixos/tests/typesense.nix | |
parent | 1211e44d5b89641d47cedbec89dd2210a0a1aca8 (diff) |
nixos/typesense: init at 0.24.1
Diffstat (limited to 'nixos/tests/typesense.nix')
-rw-r--r-- | nixos/tests/typesense.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nixos/tests/typesense.nix b/nixos/tests/typesense.nix new file mode 100644 index 0000000000000..4f07a2e194be8 --- /dev/null +++ b/nixos/tests/typesense.nix @@ -0,0 +1,23 @@ +import ./make-test-python.nix ({ pkgs, ... }: let + testPort = 8108; +in { + name = "typesense"; + meta.maintainers = with pkgs.lib.maintainers; [ oddlama ]; + + nodes.machine = { ... }: { + services.typesense = { + enable = true; + apiKeyFile = pkgs.writeText "typesense-api-key" "dummy"; + settings.server = { + api-port = testPort; + api-address = "0.0.0.0"; + }; + }; + }; + + testScript = '' + machine.wait_for_unit("typesense.service") + machine.wait_for_open_port(${toString testPort}) + assert machine.succeed("curl --fail http://localhost:${toString testPort}/health") == '{"ok":true}' + ''; +}) |