aboutsummaryrefslogtreecommitdiffstats
path: root/tests/common
diff options
context:
space:
mode:
authorSoispha Peetz <soispha@b-peetz.de>2026-11-26 01:17:17 +0100
committerSoispha Peetz <soispha@b-peetz.de>2026-11-27 00:55:53 +0100
commit30a7de827497e0d0ae596cf25a6895c00da2e5ad (patch)
tree21807b0d01dda0f0fc0b53e87b364931bce94580 /tests/common
parentscripts/test.sh: Pass along all extra arguments to the `nix` invocation (diff)
downloadnixos-server-30a7de827497e0d0ae596cf25a6895c00da2e5ad.zip
tests/common/dns/{server,client}: Adopt to the new `unbound` dns server
Diffstat (limited to '')
-rw-r--r--tests/common/dns/client.nix11
-rw-r--r--tests/common/dns/server.nix15
2 files changed, 9 insertions, 17 deletions
diff --git a/tests/common/dns/client.nix b/tests/common/dns/client.nix
index 52f3267..e55000d 100644
--- a/tests/common/dns/client.nix
+++ b/tests/common/dns/client.nix
@@ -1,10 +1,11 @@
{
- lib,
nodes,
+ lib,
...
}: {
- networking.nameservers = lib.mkForce [
- nodes.name_server.networking.primaryIPAddress
- nodes.name_server.networking.primaryIPv6Address
- ];
+ # In the test environment, we cannot use the root dns servers to perform recursive dns
+ # resolving, as there is no internet access.
+ # Instead of doing the dance with root dns servers and what-not, we just force them
+ # to directly connect to our authoritative dns server for the zones we have.
+ networking.nameservers = lib.mkForce nodes.name_server.vhack.dns.interfaces;
}
diff --git a/tests/common/dns/server.nix b/tests/common/dns/server.nix
index b37332b..0ca3ec6 100644
--- a/tests/common/dns/server.nix
+++ b/tests/common/dns/server.nix
@@ -1,24 +1,15 @@
-{
- lib,
- nodes,
- ...
-}: {
+{nodes, config, ...}: {
imports = [
../../../modules
];
- networking.nameservers = lib.mkForce [
- nodes.name_server.networking.primaryIPAddress
- nodes.name_server.networking.primaryIPv6Address
- ];
-
vhack = {
dns = {
enable = true;
openFirewall = true;
interfaces = [
- nodes.name_server.networking.primaryIPAddress
- nodes.name_server.networking.primaryIPv6Address
+ config.networking.primaryIPAddress
+ config.networking.primaryIPv6Address
];
zones = {