0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #279015 from oddlama/fix-typesense-tests

typesense: fix test failure due to initialization timing
This commit is contained in:
Nick Cao 2024-01-07 09:45:40 -05:00 committed by GitHub
commit d49252891f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ in {
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}'
# After waiting for the port, typesense still hasn't initialized the database, so wait until we can connect successfully
assert machine.wait_until_succeeds("curl --fail http://localhost:${toString testPort}/health") == '{"ok":true}'
'';
})