nixos/quickwit: Added testcase

This commit is contained in:
Jonathan Davies 2024-06-04 22:39:48 +01:00
parent 2ef778f69a
commit 237353040e
No known key found for this signature in database
2 changed files with 32 additions and 0 deletions

View File

@ -788,6 +788,7 @@ in {
qtile = handleTestOn ["x86_64-linux" "aarch64-linux"] ./qtile.nix {};
quake3 = handleTest ./quake3.nix {};
quicktun = handleTest ./quicktun.nix {};
quickwit = handleTest ./quickwit.nix {};
quorum = handleTest ./quorum.nix {};
rabbitmq = handleTest ./rabbitmq.nix {};
radarr = handleTest ./radarr.nix {};

31
nixos/tests/quickwit.nix Normal file
View File

@ -0,0 +1,31 @@
import ./make-test-python.nix ({ lib, pkgs, ... }:
{
name = "quickwit";
meta.maintainers = [ pkgs.lib.maintainers.happysalada ];
nodes = {
quickwit = { config, pkgs, ... }: {
services.quickwit.enable = true;
};
};
testScript =
''
quickwit.wait_for_unit("quickwit")
quickwit.wait_for_open_port(7280)
quickwit.wait_for_open_port(7281)
quickwit.wait_until_succeeds(
"journalctl -o cat -u quickwit.service | grep 'version: ${pkgs.quickwit.version}'"
)
quickwit.wait_until_succeeds(
"journalctl -o cat -u quickwit.service | grep 'transitioned to ready state'"
)
quickwit.log(quickwit.succeed(
"systemd-analyze security quickwit.service | grep -v ''"
))
'';
})