diff options
| author | Soispha Peetz <soispha@b-peetz.de> | 2026-11-26 01:19:30 +0100 |
|---|---|---|
| committer | Soispha Peetz <soispha@b-peetz.de> | 2026-11-27 00:55:53 +0100 |
| commit | a2f6e9ddcf953936c7803bbb0171aed8b036b16b (patch) | |
| tree | e298f7a3bd5ca78891af91aff40a8f2297144e3f /tests/by-name/dn/dns/test.nix | |
| parent | tests/atuin-sync: Use the `ports` `vhack.runTest` argument (diff) | |
| download | nixos-server-a2f6e9ddcf953936c7803bbb0171aed8b036b16b.zip | |
tests/dns: Ignore, as it no longer really works with `vhack.runTest`
Diffstat (limited to 'tests/by-name/dn/dns/test.nix')
| -rw-r--r-- | tests/by-name/dn/dns/test.nix | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tests/by-name/dn/dns/test.nix b/tests/by-name/dn/dns/test.nix index 8bf0799..cf1d67b 100644 --- a/tests/by-name/dn/dns/test.nix +++ b/tests/by-name/dn/dns/test.nix @@ -15,18 +15,31 @@ lib, nodes, ... - }: { + }: let + name = + if version == "ipv4" + then "primaryIPAddress" + else if version == "ipv6" + then "primaryIPv6Address" + else builtins.throw "Not a valid ip version: ${version}"; + in { environment.systemPackages = [pkgs.dig pkgs.dig.dnsutils]; imports = [common]; networking.nameservers = lib.mkForce [ - (lib.head nodes.server.networking.interfaces.eth1."${version}".addresses).address + nodes.server.networking.${name} ]; }; in vhack.runTest { name = "dns"; + # Problem: The `runTest` function wants to setup TLS certificates for everything and + # sets up it's own dns server for that. That unfortunately conflicts with our test + # here. But we are implicitly testing dns anyhow with the other tests, so this test + # is not really necessary. + ignore = true; + nodes = { server = { config, @@ -41,8 +54,8 @@ in dns = { enable = true; interfaces = [ - (lib.head config.networking.interfaces.eth1.ipv4.addresses).address - (lib.head config.networking.interfaces.eth1.ipv6.addresses).address + config.networking.primaryIPAddress + config.networking.primaryIPv6Address ]; zones = { "example.com" = { @@ -87,6 +100,10 @@ in {server = "nsd.service";} ]; + ports = [ + {server = 53;} + ]; + testScript = {nodes, ...}: /* python |
