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