2019-12-15 17:53:26 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
2022-04-13 15:48:53 +00:00
|
|
|
name = "powerdns-recursor";
|
2019-04-04 18:38:56 +00:00
|
|
|
|
|
|
|
nodes.server = { ... }: {
|
|
|
|
services.pdns-recursor.enable = true;
|
2022-04-13 15:48:53 +00:00
|
|
|
services.pdns-recursor.exportHosts= true;
|
|
|
|
networking.hosts."192.0.2.1" = [ "example.com" ];
|
2019-04-04 18:38:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-12-15 17:53:26 +00:00
|
|
|
server.wait_for_unit("pdns-recursor")
|
2022-06-11 12:22:53 +00:00
|
|
|
server.wait_for_open_port(53)
|
2022-04-13 15:48:53 +00:00
|
|
|
assert "192.0.2.1" in server.succeed("host example.com localhost")
|
2019-04-04 18:38:56 +00:00
|
|
|
'';
|
|
|
|
})
|