Commit Graph

112 Commits

Author SHA1 Message Date
Erik Arvstedt 8f9ea61d6e
update nixpkgs-unstable
- bitcoind 0.20.1 -> 0.21.0
  Manually create a wallet in the backup test because bitcoind
  does not create a default wallet anymore

- disable the failing elementsd build on unstable
2021-01-31 22:26:30 +01:00
Erik Arvstedt 44546561fc
run-tests: allow defining scenarios via cmdline args
This simplifies running self-contained scenarios for testing and debugging.
2021-01-30 11:38:47 +01:00
Erik Arvstedt fc40776689
improve backup test
Only check enabled services. This allows running the backup test with a custom subset of other
tests.

Also, show a meaningful error on test failure.
Previously, just an AssertionError without a message was shown.
Because the test code is evaluated from a string and not a file, there
was also no backtrace to the tests file.
2021-01-30 11:38:47 +01:00
nixbitcoin 8c125ec48c
joinmarket-obwatcher: add pkg & module 2021-01-17 17:40:12 +00:00
Erik Arvstedt 323a431aba
improve nodeinfo
- enable usage outside of secure-node.nix
- use json as the output format
- show ports
- also show local addresses, which is particularly useful when
  netns-isolation is enabled
- only show enabled services
2021-01-14 13:25:10 +01:00
Erik Arvstedt f6b883a9ac
remove webindex
This module is outdated and incomplete. We can readd an improved version in
the future.

Move nanopos nginx proxy tests to the nanopos test.
2021-01-14 13:25:10 +01:00
Erik Arvstedt 5c6977b006
rename onion-chef -> nix-bitcoin.onionAddresses
This clarifies its function.
2021-01-14 13:25:05 +01:00
Erik Arvstedt b41a720c28
lnd: add consistent address options
Also fix btcpayserver by connecting to the lnd restAddress instead of the p2p address.
2021-01-14 13:25:03 +01:00
Jonas Nick 79f4723cda
lightning-charge: remove package and module 2021-01-01 19:16:46 +00:00
Jonas Nick 58de79d401
nanopos: remove package and module 2021-01-01 17:37:30 +00:00
nixbitcoin bcedf69549
readme: update and split into various parts 2020-12-30 15:59:22 +00:00
nixbitcoin 196e3c9dbb
clboss: add test todo 2020-12-22 09:54:11 +00:00
Erik Arvstedt 2bfb4efbd8
make-container: fix usage comment 2020-12-19 13:18:50 +01:00
Erik Arvstedt 3403795c86
tests: add example scripts 2020-12-18 19:56:56 +01:00
Erik Arvstedt ff94985b8b
tests: add test 'hardened' 2020-12-18 19:56:56 +01:00
Erik Arvstedt a5a2fc7274
make-container: fix renamed variable
The variable was only renamed in run-tests.sh, which broke containers.
2020-12-16 01:29:12 +01:00
Erik Arvstedt 9977fa69af
ci: use run-tests.sh 2020-12-11 13:27:06 +01:00
Erik Arvstedt a82f0f5f48
add test 'pkgsUnstable'
Included in 'basic' tests.
Function 'doBuild' is needed by the following commit.
2020-12-11 13:27:05 +01:00
Erik Arvstedt 95bc1237e2
run-tests: rename testDir -> scriptDir 2020-12-11 13:27:05 +01:00
Erik Arvstedt a70c3bf210
make-test-vm: remove unneeded leftover arg attrs 2020-12-11 13:27:05 +01:00
Erik Arvstedt ed65e78a2b
make-test: expose test config
This is useful for programmatically exploring a test config or for building a test system
on a custom platform.
2020-12-11 13:27:04 +01:00
Erik Arvstedt 7265742655
run-tests: add 'instantiate' command
Useful for diffing test derivations.
2020-12-11 13:27:04 +01:00
Erik Arvstedt 8cbdef8bf6
run-tests: fix CLI
Restore the original behavior that was accidentally changed:
When no args are given, run the basic test suite.
Otherwise, run the given command with default scenario 'default'.
Previously, `run-tests.sh build` ran the basic test suite instead of
building the default scenario.
2020-12-11 13:27:04 +01:00
Erik Arvstedt 1c0233c0a8
use Cirrus CI
- Make more economic use of the free CI resources by removing redundant build tasks:
  - Build unstable pkgs in a single separate task ("pkgs_unstable").
  - All stable pkgs are implicitly built by the modules tests.
- The build script (ci/build.sh) can now be executed locally for easier
  debugging.
- Use an explicit 'cachix push' command instead of helper/wait-for-network-idle.rb.
  This is simpler and more reliable.
2020-12-06 19:07:54 +01:00
Ian Shipman 1d44b99340 add curated clightning plugins 2020-11-18 20:21:34 -06:00
Erik Arvstedt 4640821f96 make-test.nix: use writeText
Needed for the following commit which adds derivation outputs to `dataFile`.
2020-11-18 20:21:34 -06:00
Erik Arvstedt 7e3d2965a5
testing framework: re-add features removed in nixpkgs 20.09
Since nixpks 20.09, the test output is just an empty directory.
Restore saving the log output and linking to the driver.

Without linking to the driver, the driver is eligible for
garbage collection after running a test via `run-tests.sh --out-link-prefix`,
which implies lengthy driver rebuilds.
2020-11-11 22:27:46 +01:00
nixbitcoin f2faf708fb
test: update joinmarket query strings
JoinMarket changed message strings in
a2aafd254d and removed P2EPDaemonServerProtocolFactory in v0.7.1
2020-11-06 08:51:27 +00:00
Erik Arvstedt 4ff88efc50
netns: add address binding test
Proposed by Jonas Nick.
2020-10-29 21:21:30 +01:00
Erik Arvstedt 9ddf7864a4
lightning-loop regtest: fix incorrectly succeeding test
When 'loop getparams' fails, jq gets no stdin and exits with code 0.
Because -o pipefail is not enabled in the testing shell, the whole test
command succeeds, although it should fail.

Just test "loop getparams" instead and ignore its output.
2020-10-29 21:21:29 +01:00
Erik Arvstedt 58d24e735d
netns-bitcoind: allow RPC access from main netns 2020-10-29 21:21:27 +01:00
Erik Arvstedt 0e2ff948d3
test: add scenario 'netnsRegtest'
The 'basic' test command now cover regtest mode and using nix-bitcoin without
the secure-node preset.
2020-10-29 21:21:27 +01:00
Erik Arvstedt 9a931483b9
netns test: remove strict dependency on clightning, electrs
This allows the netns test to be run with a reduced service set for debugging.
2020-10-29 21:21:26 +01:00
Erik Arvstedt bae1b7f413
netns test: improve ping test
- Use fping for pinging multiple hosts in parallel.
  Significantly improves test runtime:
  >13 s -> ~200 ms for the negative ping tests.
- Only test network namespaces that are enabled.
  This allows running the netns test with a reduced service set for debugging.
- Remove deprecated services, instead add btcpayserver, spark-wallet
2020-10-29 21:21:26 +01:00
Erik Arvstedt e61d7b1d46
test: improve lightning-loop regtest 2020-10-19 08:59:26 +00:00
Erik Arvstedt 9951f10e74
test: add scenario 'regtest' 2020-10-16 23:55:13 +02:00
Erik Arvstedt 1f96ca67c5
electrs test: make service shutdown optional
Needed for regtest scenario.
2020-10-16 18:01:52 +02:00
Erik Arvstedt eb42fc8e06
test: extract test 'joinmarket-yieldgenerator'
Needed for regtest scenario.
2020-10-16 18:01:52 +02:00
Erik Arvstedt bfed10b2fa
run-tests: add command 'all'
'all' includes test 'full', which now succeeds.
2020-10-16 16:46:56 +02:00
Erik Arvstedt 0a6b9beda5
run-tests: simplify setting default scenario 2020-10-16 16:46:56 +02:00
Erik Arvstedt 1a32292e07
test: speed up clightning startup when offline 2020-10-16 16:46:56 +02:00
Erik Arvstedt c07e767889
test: add python test requirements
This allows running the Python tests without importing secure-node.
2020-10-16 16:46:55 +02:00
Erik Arvstedt 04075b108c
test: use QEMU from stable nixpkgs 2020-10-16 15:53:34 +02:00
Erik Arvstedt 03f8dbba47
test: add non-secure-node eval test
This tests that the modules work without the secure-node template.

The test currently fails at runtime, but evaluating already helps
catching module-related errors.
2020-10-16 15:53:34 +02:00
Erik Arvstedt bb763d6a26
run-tests: add 'eval' command 2020-10-16 15:53:34 +02:00
Erik Arvstedt c9251e72a1
README: add run-tests.sh to examples 2020-10-16 15:53:33 +02:00
Erik Arvstedt 5a565dff66
netns test: use netns ips from config 2020-10-16 15:53:33 +02:00
Erik Arvstedt ac95fe7c82
netns test: don't test recurring-donations
This service is not enabled and its netns doesn't exist.
2020-10-16 15:53:33 +02:00
Erik Arvstedt 84744f38d7
netns test: disable backup test 2020-10-16 15:53:33 +02:00
Erik Arvstedt fcc67da9f4
test: add container support 2020-10-16 15:53:33 +02:00