mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-23 17:56:53 +03:00
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 = { ... }: {
|
nodes.server = { ... }: {
|
||||||
networking.nameservers = [ "127.0.0.1" ];
|
networking.nameservers = [ "::1" ];
|
||||||
|
|
||||||
services.namecoind.rpc = {
|
services.namecoind.rpc = {
|
||||||
address = "127.0.0.1";
|
address = "::1";
|
||||||
user = "namecoin";
|
user = "namecoin";
|
||||||
password = "secret";
|
password = "secret";
|
||||||
port = 8332;
|
port = 8332;
|
||||||
|
@ -45,7 +45,7 @@ in
|
||||||
script = ''
|
script = ''
|
||||||
while true; do
|
while true; do
|
||||||
echo -e "HTTP/1.1 200 OK\n\n $(<${fakeReply})\n" \
|
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
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -58,14 +58,10 @@ in
|
||||||
identity.address = "1.0.0.1";
|
identity.address = "1.0.0.1";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.pdns-recursor = {
|
services.pdns-recursor.enable = true;
|
||||||
enable = true;
|
services.pdns-recursor.resolveNamecoin = true;
|
||||||
dns.allowFrom = [ "127.0.0.0/8" ];
|
|
||||||
resolveNamecoin = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.dnsutils ];
|
environment.systemPackages = [ pkgs.dnsutils ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
|
@ -91,6 +87,7 @@ in
|
||||||
assert "example.com" in server.succeed("dig SOA @localhost -p 5333 bit")
|
assert "example.com" in server.succeed("dig SOA @localhost -p 5333 bit")
|
||||||
|
|
||||||
with subtest("bit. zone forwarding works"):
|
with subtest("bit. zone forwarding works"):
|
||||||
|
server.wait_for_unit("pdns-recursor")
|
||||||
assert "1.2.3.4" in server.succeed("host test.bit")
|
assert "1.2.3.4" in server.succeed("host test.bit")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue