2020-04-24 23:36:52 +00:00
|
|
|
{ system ? builtins.currentSystem,
|
|
|
|
config ? {},
|
|
|
|
pkgs ? import ../.. { inherit system config; }
|
|
|
|
}:
|
|
|
|
|
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
test1 = makeTest {
|
|
|
|
name = "rsyslogd-test1";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta.maintainers = [ pkgs.lib.maintainers.aanderse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
machine = { config, pkgs, ... }: {
|
|
|
|
services.rsyslogd.enable = true;
|
|
|
|
services.journald.forwardToSyslog = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# ensure rsyslogd isn't receiving messages from journald if explicitly disabled
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("default.target")
|
|
|
|
machine.fail("test -f /var/log/messages")
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
test2 = makeTest {
|
|
|
|
name = "rsyslogd-test2";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta.maintainers = [ pkgs.lib.maintainers.aanderse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
machine = { config, pkgs, ... }: {
|
|
|
|
services.rsyslogd.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# ensure rsyslogd is receiving messages from journald
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("default.target")
|
|
|
|
machine.succeed("test -f /var/log/messages")
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|