make-test.nix: use writeText
Needed for the following commit which adds derivation outputs to `dataFile`.
This commit is contained in:
parent
5399f73b20
commit
4640821f96
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user