about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/pdns-recursor.nix
blob: 14f1b7ea8a35f4680d08cea8d8bb861342447452 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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")
  '';
})