git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/tests/pdns-recursor: test a DNS query
commitfe27976534472b042d41f7b30c0aa0af6e8a7444 authorrnhmjoj <rnhmjoj@inventati.org> dateWed 13 Apr 2022, 17:48 (5 years ago) parentfd480f5
1 file changed+4−1
nixos/tests/pdns-recursor.nix+4−1
nixos/tests/pdns-recursor.nix+4−1
@@ -1,12 +1,15 @@
11import ./make-test-python.nix ({ pkgs, ... }: {
2− name = "powerdns";
2+ name = "powerdns-recursor";
33
44 nodes.server = { ... }: {
55 services.pdns-recursor.enable = true;
6+ services.pdns-recursor.exportHosts= true;
7+ networking.hosts."192.0.2.1" = [ "example.com" ];
68 };
79
810 testScript = ''
911 server.wait_for_unit("pdns-recursor")
1012 server.wait_for_open_port("53")
13+ assert "192.0.2.1" in server.succeed("host example.com localhost")
1114 '';
1215})