about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-06-03 17:17:00 +0200
committeraszlig <aszlig@nix.build>2020-06-03 17:21:54 +0200
commit89c3cda819da5dc32e4a29ff8f2aad118bde64c7 (patch)
treeb2f78620f83b56b2a6a258ec5929b2d4a11aa6b8
parent1ee50701ea6edd0970c4b5e414c49ee7257c2c8f (diff)
core/tests: Fix attribute paths for wireguard
A few days ago, the wireguard tests were consolidated[1] into a single
attribute with various subattributes, similar to how the virtualbox
tests and many other tests are structured.

I fixed the attributes and also added the wg-quick attribute that was
also introduced in the meantime[2].

This should fix the evaluation errors occuring whenever a channel
contains a machine configuration with wireguard enabled.

[1]: https://github.com/NixOS/nixpkgs/commit/41bd6d2614749d12ce5ded3e991555b56ea6b2dc
[2]: https://github.com/NixOS/nixpkgs/commit/abf60791e2bd274d39e0f18def46795798f9aefd

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Profpatsch
-rw-r--r--modules/core/tests.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/core/tests.nix b/modules/core/tests.nix
index b1e18259..26a04477 100644
--- a/modules/core/tests.nix
+++ b/modules/core/tests.nix
@@ -1060,18 +1060,21 @@ let
       path  = ["nixos" "virtualbox" "headless"];
     }
     { check = config.networking.wireguard.enable;
-      path  = ["nixos" "wireguard"];
+      path  = ["nixos" "wireguard" "basic"];
     }
     { check = with config.networking.wireguard; enable
            && anyAttrs (i: i.generatePrivateKeyFile) interfaces;
-      path  = ["nixos" "wireguard-generated"];
+      path  = ["nixos" "wireguard" "generated"];
     }
     { check = let
         isEnabled = config.networking.wireguard.enable;
         usesNS = iface: iface.socketNamespace != null
               || iface.interfaceNamespace != null;
       in isEnabled && anyAttrs usesNS config.networking.wireguard.interfaces;
-      path  = ["nixos" "wireguard-namespaces"];
+      path  = ["nixos" "wireguard" "namespaces"];
+    }
+    { check = config.networking.wg-quick.interfaces != {};
+      path  = ["nixos" "wireguard" "wg-quick"];
     }
     { check = config.services.wordpress != {};
       path  = ["nixos" "wordpress"];