make-test.nix: use writeText

Needed for the following commit which adds derivation outputs to `dataFile`.
This commit is contained in:
Erik Arvstedt 2020-11-19 03:01:44 +01:00 committed by Ian Shipman
parent 5399f73b20
commit 4640821f96
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ testArgs:
let
pkgs = import <nixpkgs> { 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

View File

@ -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