0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00
nixpkgs/nixos/tests/victorialogs.nix
2025-06-21 21:00:40 +02:00

26 lines
659 B
Nix

{ lib, ... }:
{
name = "victorialogs";
meta.maintainers = with lib.maintainers; [ marie ];
nodes.machine =
{ pkgs, ... }:
{
services.victorialogs.enable = true;
services.journald.upload = {
enable = true;
settings = {
Upload.URL = "http://localhost:9428/insert/journald";
};
};
environment.systemPackages = [ pkgs.curl ];
};
testScript = ''
machine.wait_for_unit("victorialogs.service")
machine.succeed("echo 'meow' | systemd-cat -p info")
machine.wait_until_succeeds("curl --fail http://localhost:9428/select/logsql/query -d 'query=\"meow\"' | grep meow")
'';
}