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
|
let
|
||||||
pkgs = import <nixpkgs> { config = {}; overlays = []; };
|
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:
|
fixedTest = { system ? builtins.currentSystem, ... }@args:
|
||||||
let
|
let
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
scenario: testConfig:
|
scenario: testConfig:
|
||||||
|
|
||||||
{
|
{
|
||||||
vm = import ./make-test-vm.nix {
|
vm = import ./make-test-vm.nix (pkgs: {
|
||||||
name = "nix-bitcoin-${scenario}";
|
name = "nix-bitcoin-${scenario}";
|
||||||
|
|
||||||
machine = {
|
machine = {
|
||||||
@ -16,7 +16,7 @@ scenario: testConfig:
|
|||||||
data = cfg.test.data;
|
data = cfg.test.data;
|
||||||
tests = cfg.tests;
|
tests = cfg.tests;
|
||||||
};
|
};
|
||||||
dataFile = builtins.toFile "test-data" (builtins.toJSON data);
|
dataFile = pkgs.writeText "test-data" (builtins.toJSON data);
|
||||||
initData = ''
|
initData = ''
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ scenario: testConfig:
|
|||||||
run_tests()
|
run_tests()
|
||||||
''
|
''
|
||||||
];
|
];
|
||||||
};
|
});
|
||||||
|
|
||||||
container = {
|
container = {
|
||||||
# The container name has a 11 char length limit
|
# The container name has a 11 char length limit
|
||||||
|
Loading…
Reference in New Issue
Block a user