From 4640821f9660cc2231f3fabc88f793b7abbf3a87 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 19 Nov 2020 03:01:44 +0100 Subject: [PATCH] make-test.nix: use writeText Needed for the following commit which adds derivation outputs to `dataFile`. --- test/lib/make-test-vm.nix | 2 +- test/lib/make-test.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/lib/make-test-vm.nix b/test/lib/make-test-vm.nix index c7eccdc..90d3e64 100644 --- a/test/lib/make-test-vm.nix +++ b/test/lib/make-test-vm.nix @@ -3,7 +3,7 @@ testArgs: let pkgs = import { config = {}; overlays = []; }; - test = (import "${pkgs.path}/nixos/tests/make-test-python.nix") testArgs; + test = (import "${pkgs.path}/nixos/tests/make-test-python.nix") (testArgs pkgs); fixedTest = { system ? builtins.currentSystem, ... }@args: let diff --git a/test/lib/make-test.nix b/test/lib/make-test.nix index 9deb067..a0baa17 100644 --- a/test/lib/make-test.nix +++ b/test/lib/make-test.nix @@ -1,7 +1,7 @@ scenario: testConfig: { - vm = import ./make-test-vm.nix { + vm = import ./make-test-vm.nix (pkgs: { name = "nix-bitcoin-${scenario}"; machine = { @@ -16,7 +16,7 @@ scenario: testConfig: data = cfg.test.data; tests = cfg.tests; }; - dataFile = builtins.toFile "test-data" (builtins.toJSON data); + dataFile = pkgs.writeText "test-data" (builtins.toJSON data); initData = '' import json @@ -37,7 +37,7 @@ scenario: testConfig: run_tests() '' ]; - }; + }); container = { # The container name has a 11 char length limit