1{ system ? builtins.currentSystem, config ? { }
2, pkgs ? import ../.. { inherit system config; } }:
3
4with import ../lib/testing-python.nix { inherit system pkgs; };
5with pkgs.lib;
6
7{
8 test1 = makeTest {
9 name = "vector-test1";
10 meta.maintainers = [ pkgs.lib.maintainers.happysalada ];
11
12 nodes.machine = { config, pkgs, ... }: {
13 services.vector = {
14 enable = true;
15 journaldAccess = true;
16 settings = {
17 sources.journald.type = "journald";
18
19 sinks = {
20 file = {
21 type = "file";
22 inputs = [ "journald" ];
23 path = "/var/lib/vector/logs.log";
24 encoding = { codec = "json"; };
25 };
26 };
27 };
28 };
29 };
30
31 # ensure vector is forwarding the messages appropriately
32 testScript = ''
33 machine.wait_for_unit("vector.service")
34 machine.wait_for_file("/var/lib/vector/logs.log")
35 '';
36 };
37}