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:
parent
d39a10daa8
commit
a1cb6e5a88
1 changed files with 6 additions and 9 deletions
|
@ -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")
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue