Skip to content

Commit a32dbad

Browse files
committed
nixosTests: fixup tests/common/resolver to work with a local resolver
When 757a455 refactored the zones to go from a list to a map, this broke the tests/common/resolver helper. reproduction: ``` let pkgs = import <nixpkgs> {}; testConfig = { name = "resolver-repro"; nodes = { acme = { nodes, ... }: { imports = [ (pkgs.path + /nixos/tests/common/acme/server) ]; }; }; testScript = '' ''; }; in pkgs.nixosTest testConfig ```
1 parent 1c2278e commit a32dbad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nixos/tests/common/resolver.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131
services.bind.forwarders = lib.mkForce [];
3232
services.bind.zones = lib.singleton {
3333
name = ".";
34+
master = true;
3435
file = let
3536
addDot = zone: zone + lib.optionalString (!lib.hasSuffix "." zone) ".";
3637
mkNsdZoneNames = zones: map addDot (lib.attrNames zones);
37-
mkBindZoneNames = zones: map (zone: addDot zone.name) zones;
38+
mkBindZoneNames = zones: map addDot (lib.attrNames zones);
3839
getZones = cfg: mkNsdZoneNames cfg.services.nsd.zones
3940
++ mkBindZoneNames cfg.services.bind.zones;
4041

0 commit comments

Comments
 (0)