2020-04-24 23:36:52 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
2022-04-15 01:41:22 +00:00
|
|
|
name = "powerdns-recursor";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nodes.server = { ... }: {
|
|
|
|
services.pdns-recursor.enable = true;
|
2022-04-15 01:41:22 +00:00
|
|
|
services.pdns-recursor.exportHosts= true;
|
|
|
|
networking.hosts."192.0.2.1" = [ "example.com" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
server.wait_for_unit("pdns-recursor")
|
|
|
|
server.wait_for_open_port("53")
|
2022-04-15 01:41:22 +00:00
|
|
|
assert "192.0.2.1" in server.succeed("host example.com localhost")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
})
|