diff options
| author | Soispha Peetz <soispha@b-peetz.de> | 2026-10-29 23:32:22 +0100 |
|---|---|---|
| committer | Soispha Peetz <soispha@b-peetz.de> | 2026-11-27 00:27:17 +0100 |
| commit | 021564ffd40d54a59dd461b7d0d5e00a3c86ed0e (patch) | |
| tree | 86e5d3612603fdf50b84c4c3fb62b0537da28249 /tests/by-name/dn | |
| parent | tests/stalwart-*: Hard disable them (diff) | |
| download | nixos-server-021564ffd40d54a59dd461b7d0d5e00a3c86ed0e.zip | |
treewide: Rework entry points and attribute names
That just makes a lot of stuff easier and more streamlined. Also, all
choices between stable or unstable nixpkgs should now be explicit.
Diffstat (limited to '')
| -rw-r--r-- | tests/by-name/dn/dns/test.nix | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/tests/by-name/dn/dns/test.nix b/tests/by-name/dn/dns/test.nix index 01d8833..8bf0799 100644 --- a/tests/by-name/dn/dns/test.nix +++ b/tests/by-name/dn/dns/test.nix @@ -1,14 +1,11 @@ # Inspired by this file: /nixpkgs/nixos/tests/nsd.nix { - nixos-lib, - pkgsUnstable, - nixpkgs-unstable, - vhackPackages, - pkgs, - extraModules, - nixLib, + packageSets, + vhack, ... }: let + pkgs = packageSets.stable; + common = {...}: { networking.firewall.enable = false; networking.dhcpcd.enable = false; @@ -27,30 +24,18 @@ ]; }; in - nixos-lib.runTest { - hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs - + vhack.runTest { name = "dns"; - node = { - specialArgs = {inherit pkgsUnstable vhackPackages nixpkgs-unstable nixLib;}; - - # Use the nixpkgs as constructed by the `nixpkgs.*` options - pkgs = null; - }; - nodes = { server = { config, lib, ... }: { - imports = - extraModules - ++ [ - ../../../../modules - common - ]; + imports = [ + common + ]; vhack = { dns = { @@ -96,17 +81,17 @@ in clientV6 = mkClient "ipv6"; }; + services = [ + {clientV4 = "network.target";} + {clientV6 = "network.target";} + {server = "nsd.service";} + ]; + testScript = {nodes, ...}: /* python */ '' - start_all() - - clientV4.wait_for_unit("network.target") - clientV6.wait_for_unit("network.target") - server.wait_for_unit("nsd.service") - def assert_host(ipVersion, dnsRecordType, dnsQuery, expected): self = clientV4 if ipVersion == 4 else clientV6 out = self.succeed(f"host -{ipVersion} -t {dnsRecordType} {dnsQuery}").rstrip() |
