daemon/test: test unilateral close.

We use dev-disconnect to convince one node the other has disconnected
(but not vice versa), to get deterministic behaviour.  We do this with
one HTLC outstanding, to test the HTLC timeout path.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-05-04 16:14:22 +09:30
parent 0f9889f2c6
commit 623eec4068
2 changed files with 50 additions and 1 deletions

View File

@@ -187,7 +187,7 @@ $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(CORE_H
# These don't work in parallel, so we open-code them
daemon-tests: daemon-all
daemon/test/scripts/shutdown.sh 2>/dev/null || true
set -e; for arg in "" "--timeout-anchor"; do daemon/test/test.sh $$arg; done
set -e; for arg in "--dump-onchain" "" "--timeout-anchor"; do daemon/test/test.sh $$arg; done
test-onion: test/test_onion test/onion_key
set -e; TMPF=/tmp/onion.$$$$; test/test_onion --generate $$(test/onion_key --pub `seq 20`) > $$TMPF; for k in `seq 20`; do test/test_onion --decode $$(test/onion_key --priv $$k) < $$TMPF > $$TMPF.unwrap; mv $$TMPF.unwrap $$TMPF; done; rm -f $$TMPF