nixos/tests/pdns-recursor: test old-settings
This commit is contained in:
@@ -1018,7 +1018,7 @@ in
|
|||||||
paperless = handleTest ./paperless.nix { };
|
paperless = handleTest ./paperless.nix { };
|
||||||
parsedmarc = handleTest ./parsedmarc { };
|
parsedmarc = handleTest ./parsedmarc { };
|
||||||
password-option-override-ordering = handleTest ./password-option-override-ordering.nix { };
|
password-option-override-ordering = handleTest ./password-option-override-ordering.nix { };
|
||||||
pdns-recursor = handleTest ./pdns-recursor.nix { };
|
pdns-recursor = runTest ./pdns-recursor.nix;
|
||||||
pds = handleTest ./pds.nix { };
|
pds = handleTest ./pds.nix { };
|
||||||
peerflix = handleTest ./peerflix.nix { };
|
peerflix = handleTest ./peerflix.nix { };
|
||||||
peering-manager = handleTest ./web-apps/peering-manager.nix { };
|
peering-manager = handleTest ./web-apps/peering-manager.nix { };
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
import ./make-test-python.nix (
|
{ lib, pkgs, ... }:
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
name = "powerdns-recursor";
|
name = "powerdns-recursor";
|
||||||
|
meta.maintainers = with lib.maintainers; [ rnhmjoj ];
|
||||||
|
|
||||||
nodes.server =
|
nodes.server = {
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
services.pdns-recursor.enable = true;
|
services.pdns-recursor.enable = true;
|
||||||
services.pdns-recursor.exportHosts = true;
|
services.pdns-recursor.exportHosts = true;
|
||||||
|
services.pdns-recursor.old-settings.dnssec-log-bogus = true;
|
||||||
networking.hosts."192.0.2.1" = [ "example.com" ];
|
networking.hosts."192.0.2.1" = [ "example.com" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
|
with subtest("pdns-recursor is running"):
|
||||||
server.wait_for_unit("pdns-recursor")
|
server.wait_for_unit("pdns-recursor")
|
||||||
server.wait_for_open_port(53)
|
server.wait_for_open_port(53)
|
||||||
|
|
||||||
|
with subtest("can resolve names"):
|
||||||
assert "192.0.2.1" in server.succeed("host example.com localhost")
|
assert "192.0.2.1" in server.succeed("host example.com localhost")
|
||||||
|
|
||||||
|
with subtest("old-settings have been merged in"):
|
||||||
|
server.succeed("${lib.getExe pkgs.yq-go} -e .dnssec.log_bogus /etc/pdns-recursor/recursor.yml")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user