nixos/adguardhome: add tests ensuring logging to syslog works

This commit is contained in:
Felix Stupp
2026-06-16 00:26:41 +00:00
parent 6ac56136e5
commit 8c75f138ff

View File

@@ -22,6 +22,14 @@
};
};
syslogConf = {
services.adguardhome = {
enable = true;
settings.log.file = "syslog";
};
};
declarativeConf = {
services.adguardhome = {
enable = true;
@@ -122,6 +130,12 @@
schemaVersionBefore23.wait_for_unit("adguardhome.service")
schemaVersionBefore23.wait_for_open_port(3000)
with subtest("Logging to syslog test"):
# AdGuard is expected to fail when it cannot connect to syslog
# hence its sufficient to look whether the service starts at all
syslogConf.wait_for_unit("adguardhome.service")
syslogConf.wait_for_open_port(3000)
with subtest("Declarative config test, DNS will be reachable"):
declarativeConf.wait_for_unit("adguardhome.service")
declarativeConf.wait_for_open_port(53)