1import ./make-test-python.nix (
2 { pkgs, ... }:
3 {
4 name = "powerdns-recursor";
5
6 nodes.server =
7 { ... }:
8 {
9 services.pdns-recursor.enable = true;
10 services.pdns-recursor.exportHosts = true;
11 networking.hosts."192.0.2.1" = [ "example.com" ];
12 };
13
14 testScript = ''
15 server.wait_for_unit("pdns-recursor")
16 server.wait_for_open_port(53)
17 assert "192.0.2.1" in server.succeed("host example.com localhost")
18 '';
19 }
20)