Christian Decker
f6d60b9076
pytest: Fail tests that produce valgrind errors
Check and print all valgrind errors and fail tests that produce
errors. We abort using an exception since `fail()` is not allowed in
the teardown.
8 years ago
Rusty Russell
42601c29d7
test_lightning.py: run valgrind on child daemons too
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
6d06303789
pytest: Remove obsolete test and fix two flaky tests
8 years ago
Christian Decker
23da30a2a4
pytest: Better dealing with env variables to configure tests
8 years ago
Rusty Russell
162dac1271
peer_control: don't complete fundchannel command until broadcast.
Under stress, the tests can mine blocks too soon, and the funding never
locks. This gives more of a chance, at least.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
39fb7d82fb
test_lightningd.py: re-enable and fix forwarding test.
But it breaks:
test_forward (__main__.LightningDTests) ... lightningd_channel: Computed MAC does not match expected MAC, the message was modified.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
f700662a56
routing: Reading the channel_id from routes passed in from JSONRPC
8 years ago
Christian Decker
f24aab1916
sphinx: Updating daemon to new sphinx implementation
Mainly switching from the old include to the new include and adjusting
the actual size of the onion packet. It also moves `channel.c` to use
`struct hop_data`.
It introduces a dummy next hop in `channel.c` that will be replaced in
the next commit.
8 years ago
Rusty Russell
778b756369
channel: support HTLC forwarding.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
aa01b7d120
test_lightningd.py: helper to sync blockheight.
We need this to avoid spurious errors in the next patch.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
dc7b832e83
pytest: Added gossip test for new daemon
8 years ago
Rusty Russell
f61da7eb64
tests/test_lightningd.py: incorporate everything from old test-basic shell test.
This moves all the non-legacy blackbox testing into python.
Before:
real 10m18.385s
After:
real 9m54.877s
Note that this doesn't valgrind the subdaemons: that patch seems to cause
some issues in the python framework which I am still chasing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
366d67ae6d
tests/test_lightningd.py: extract connect and fund_channel helpers.
Common pattern when setting up tests.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
056f93e2d2
ping: move test to python.
Faster and neater.
Before:
real 0m11.200s
After:
real 0m9.101s
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
4e0be7a48f
pytest: Added dynamic RPC call dispatch
Instead of having to define every single method we can now just call
any method, it'll fail upstream if it does not exist.
8 years ago
Christian Decker
b6fea5b429
pytest: Check that channels are announced and activated correctly
8 years ago
Christian Decker
9c7c2a3f2f
pytest: Added simple pytest for the new JSON-RPC
8 years ago
Christian Decker
b5c2d7d47d
pytest: Gossip subdaemon had a flaky test
Whenever we were checking for the status before the daemon was
initialized the test would fail. Now just waiting for the state
transition.
8 years ago
Rusty Russell
1575181ef5
pytest: don't assume paths of valgrind and bitcoind.
In particular, my bitcoind is in /usr/local/bin
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
180c96776b
pytest: Split the python integration tests into new and legacy
8 years ago
Christian Decker
cf1c03f4d9
pytest: Implemented initial python integration tests.
8 years ago