depot/third_party/nixpkgs/nixos/tests/pdns-recursor.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

15 lines
429 B
Nix

import ./make-test-python.nix ({ pkgs, ... }: {
name = "powerdns-recursor";
nodes.server = { ... }: {
services.pdns-recursor.enable = true;
services.pdns-recursor.exportHosts= true;
networking.hosts."192.0.2.1" = [ "example.com" ];
};
testScript = ''
server.wait_for_unit("pdns-recursor")
server.wait_for_open_port(53)
assert "192.0.2.1" in server.succeed("host example.com localhost")
'';
})