From bdb1643acdb75d92f10559be06ea9448461ddf12 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 18 Mar 2015 00:09:44 +0100 Subject: tests/make-test: Actually use testArgsWithCommon. I shouldn't be wondering why it doesn't find the module options if we prepare the override but don't actually use it. So this also fixes a few other errors related to that we're now actually using our own modules. Signed-off-by: aszlig --- tests/make-test.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/make-test.nix') diff --git a/tests/make-test.nix b/tests/make-test.nix index c20bd3ef..10381afd 100644 --- a/tests/make-test.nix +++ b/tests/make-test.nix @@ -1,4 +1,6 @@ f: { system ? builtins.currentSystem, ... } @ args: let + lib = import ; + testLib = import { inherit system; }; @@ -11,16 +13,16 @@ f: { system ? builtins.currentSystem, ... } @ args: let }; }) else f; - nodes = if testArgs ? machine then { + nodes = testArgs.nodes or (if testArgs ? machine then { inherit (testArgs) machine; - } else testArgs.nodes; + } else {}); - injectCommon = name: values: { - imports = [ ../common.nix values ]; + injectCommon = name: conf: { + imports = [ ../common.nix conf ]; }; testArgsWithCommon = removeAttrs testArgs [ "machine" ] // { - nodes = testLib.mapAttrs injectCommon nodes; + nodes = lib.mapAttrs injectCommon nodes; }; -in testLib.makeTest testArgs +in testLib.makeTest testArgsWithCommon -- cgit 1.4.1