nixos/tests/ncdns: fix test

1. Add another wait_for_unit("pdns-recursor")
   (this is needed when DNSSEC is disabled)

2. Make everything IPv6
This commit is contained in:
rnhmjoj 2022-04-13 21:52:31 +02:00
parent d39a10daa8
commit a1cb6e5a88
No known key found for this signature in database
GPG key ID: BFBAF4C975F76450

View file

@ -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")
'';
})