From 5997986fd84b88dd619167b346af77ba5f5db80f Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 1 Aug 2016 23:02:29 +0200 Subject: core/tests: Improve checks for container config This reverts commit 3f0a9e8002802e5a772b7582f8254c92d7a2a4d5. It's now possible to disable support and tests for containers simply by using config.boot.enableContainers in the machine config, because that's the super option that enables all the container-related services and tools in upstream NixOS and it's also enabled by default. Signed-off-by: aszlig --- modules/core/tests.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/core/tests.nix b/modules/core/tests.nix index 2e8b8c06..85a4340e 100644 --- a/modules/core/tests.nix +++ b/modules/core/tests.nix @@ -37,18 +37,21 @@ let { check = anyAttrs (i: i.hostBridge != null) config.containers; path = ["nixos" "containers-bridge"]; } - { check = config.networking.hostName != "brawndo"; # FIXME + { check = config.boot.enableContainers; path = ["nixos" "containers-imperative"]; } - { check = anyAttrs (i: i.hostAddress != null + { check = config.boot.enableContainers + && anyAttrs (i: i.hostAddress != null || i.localAddress != null) config.containers; path = ["nixos" "containers-ipv4"]; } - { check = anyAttrs (i: i.hostAddress6 != null + { check = config.boot.enableContainers + && anyAttrs (i: i.hostAddress6 != null || i.localAddress6 != null) config.containers; path = ["nixos" "containers-ipv6"]; } - { check = anyAttrs (i: i.extraVeths != {}) config.containers; + { check = config.boot.enableContainers + && anyAttrs (i: i.extraVeths != {}) config.containers; path = ["nixos" "containers-extra_veth"]; } { check = config.services.dnscrypt-proxy.enable; -- cgit 1.4.1