test: add scenario 'netnsRegtest'
The 'basic' test command now cover regtest mode and using nix-bitcoin without the secure-node preset.
This commit is contained in:
parent
e0675cb256
commit
0e2ff948d3
@ -16,7 +16,7 @@ env:
|
||||
jobs:
|
||||
- TestModules=1 STABLE=1 SCENARIO=default
|
||||
- TestModules=1 STABLE=1 SCENARIO=netns
|
||||
- EvalModules=1 STABLE=1
|
||||
- TestModules=1 STABLE=1 SCENARIO=netnsRegtest
|
||||
- PKG=hwi STABLE=1
|
||||
- PKG=hwi STABLE=0
|
||||
- PKG=lightning-charge STABLE=1
|
||||
@ -35,12 +35,6 @@ env:
|
||||
- PKG=joinmarket STABLE=0
|
||||
script:
|
||||
- printf '%s (%s)\n' "$NIX_PATH" "$VER"
|
||||
#
|
||||
- |
|
||||
if [[ $EvalModules ]]; then
|
||||
test/run-tests.sh --scenario full eval
|
||||
travis_terminate 0
|
||||
fi
|
||||
- |
|
||||
getBuildExpr() {
|
||||
if [[ $TestModules ]]; then
|
||||
|
@ -169,12 +169,12 @@ EOF
|
||||
}
|
||||
|
||||
# A basic subset of tests to keep the total runtime within
|
||||
# manageable bounds (<3 min on desktop systems).
|
||||
# manageable bounds (<4 min on desktop systems).
|
||||
# These are also run on the CI server.
|
||||
basic() {
|
||||
scenario=default buildTest "$@"
|
||||
scenario=netns buildTest "$@"
|
||||
scenario=full evalTest "$@"
|
||||
scenario=netnsRegtest buildTest "$@"
|
||||
}
|
||||
|
||||
all() {
|
||||
@ -182,6 +182,7 @@ all() {
|
||||
scenario=netns buildTest "$@"
|
||||
scenario=full buildTest "$@"
|
||||
scenario=regtest buildTest "$@"
|
||||
scenario=netnsRegtest buildTest "$@"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
@ -111,12 +111,7 @@ let testEnv = rec {
|
||||
};
|
||||
|
||||
netns = {
|
||||
imports = [ scenarios.secureNode ];
|
||||
nix-bitcoin.netns-isolation.enable = true;
|
||||
test.data.netns = config.nix-bitcoin.netns-isolation.netns;
|
||||
tests.netns-isolation = true;
|
||||
environment.systemPackages = [ pkgs.fping ];
|
||||
|
||||
imports = with scenarios; [ netnsBase secureNode ];
|
||||
# This test is rather slow and unaffected by netns settings
|
||||
tests.backups = mkForce false;
|
||||
};
|
||||
@ -133,12 +128,24 @@ let testEnv = rec {
|
||||
services.joinmarket.enable = true;
|
||||
};
|
||||
|
||||
# netns and regtest, without secure-node.nix
|
||||
netnsRegtest = {
|
||||
imports = with scenarios; [ netnsBase regtest ];
|
||||
};
|
||||
|
||||
netnsBase = {
|
||||
nix-bitcoin.netns-isolation.enable = true;
|
||||
test.data.netns = config.nix-bitcoin.netns-isolation.netns;
|
||||
tests.netns-isolation = true;
|
||||
environment.systemPackages = [ pkgs.fping ];
|
||||
};
|
||||
|
||||
regtestBase = {
|
||||
tests.regtest = true;
|
||||
|
||||
services.bitcoind.regtest = true;
|
||||
systemd.services.bitcoind.postStart = mkAfter ''
|
||||
cli=${config.services.bitcoind.cli}/bin/bitcoin-cli
|
||||
cli=${config.services.bitcoind.cliBase}/bin/bitcoin-cli
|
||||
address=$($cli getnewaddress)
|
||||
$cli generatetoaddress 10 $address
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user