diff --git a/nixos/tests/ncdns.nix b/nixos/tests/ncdns.nix index 50193676f34f..5099d697e035 100644 --- a/nixos/tests/ncdns.nix +++ b/nixos/tests/ncdns.nix @@ -29,10 +29,10 @@ in }; nodes.server = { ... }: { - networking.nameservers = [ "127.0.0.1" ]; + networking.nameservers = [ "::1" ]; services.namecoind.rpc = { - address = "127.0.0.1"; + address = "::1"; user = "namecoin"; password = "secret"; port = 8332; @@ -45,7 +45,7 @@ in script = '' while true; do echo -e "HTTP/1.1 200 OK\n\n $(<${fakeReply})\n" \ - | ${pkgs.netcat}/bin/nc -N -l 127.0.0.1 8332 + | ${pkgs.netcat}/bin/nc -N -l ::1 8332 done ''; }; @@ -58,14 +58,10 @@ in identity.address = "1.0.0.1"; }; - services.pdns-recursor = { - enable = true; - dns.allowFrom = [ "127.0.0.0/8" ]; - resolveNamecoin = true; - }; + services.pdns-recursor.enable = true; + services.pdns-recursor.resolveNamecoin = true; environment.systemPackages = [ pkgs.dnsutils ]; - }; testScript = @@ -91,6 +87,7 @@ in assert "example.com" in server.succeed("dig SOA @localhost -p 5333 bit") with subtest("bit. zone forwarding works"): + server.wait_for_unit("pdns-recursor") assert "1.2.3.4" in server.succeed("host test.bit") ''; })