Files
nixpkgs/nixos/tests/pdns-recursor.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

26 lines
765 B
Nix

{ lib, pkgs, ... }:
{
name = "powerdns-recursor";
meta.maintainers = with lib.maintainers; [ rnhmjoj ];
nodes.server = {
services.pdns-recursor.enable = true;
services.pdns-recursor.exportHosts = true;
services.pdns-recursor.old-settings.dnssec-log-bogus = true;
networking.hosts."192.0.2.1" = [ "example.com" ];
};
testScript = ''
with subtest("pdns-recursor is running"):
server.wait_for_unit("pdns-recursor")
server.wait_for_open_port(53)
with subtest("can resolve names"):
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")
'';
}