about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/pdns-recursor.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/pdns-recursor.nix')
-rw-r--r--nixpkgs/nixos/tests/pdns-recursor.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/nixpkgs/nixos/tests/pdns-recursor.nix b/nixpkgs/nixos/tests/pdns-recursor.nix
index de1b60e0b1c7..14f1b7ea8a35 100644
--- a/nixpkgs/nixos/tests/pdns-recursor.nix
+++ b/nixpkgs/nixos/tests/pdns-recursor.nix
@@ -1,12 +1,15 @@
 import ./make-test-python.nix ({ pkgs, ... }: {
-  name = "powerdns";
+  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")
+    server.wait_for_open_port(53)
+    assert "192.0.2.1" in server.succeed("host example.com localhost")
   '';
 })