mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
nixos/adguardhome: add tests ensuring logging to syslog works
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user