mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pytest: don't redirect stderr by default.
Some tests need to inspect it, but most don't, and I suspect I'm missing some error messages due to this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
aaf743e438
commit
4cada557ba
@@ -109,7 +109,7 @@ def test_bitcoin_failure(node_factory, bitcoind):
|
||||
# Ignore BROKEN log message about blocksonly mode.
|
||||
l2 = node_factory.get_node(start=False, expect_fail=True,
|
||||
allow_broken_log=True)
|
||||
l2.daemon.start(wait_for_initialized=False)
|
||||
l2.daemon.start(wait_for_initialized=False, stderr_redir=True)
|
||||
# Will exit with failure code.
|
||||
assert l2.daemon.wait() == 1
|
||||
assert l2.daemon.is_in_stderr(r".*deactivating transaction relay is not"
|
||||
@@ -1212,7 +1212,7 @@ def test_rescan(node_factory, bitcoind):
|
||||
l1.daemon.opts['rescan'] = -500000
|
||||
l1.stop()
|
||||
bitcoind.generate_block(4)
|
||||
l1.daemon.start(wait_for_initialized=False)
|
||||
l1.daemon.start(wait_for_initialized=False, stderr_redir=True)
|
||||
# Will exit with failure code.
|
||||
assert l1.daemon.wait() == 1
|
||||
assert l1.daemon.is_in_stderr(r"bitcoind has gone backwards from 500000 to 105 blocks!")
|
||||
@@ -1243,7 +1243,7 @@ def test_bitcoind_goes_backwards(node_factory, bitcoind):
|
||||
bitcoind.start()
|
||||
|
||||
# Will simply refuse to start.
|
||||
l1.daemon.start(wait_for_initialized=False)
|
||||
l1.daemon.start(wait_for_initialized=False, stderr_redir=True)
|
||||
# Will exit with failure code.
|
||||
assert l1.daemon.wait() == 1
|
||||
assert l1.daemon.is_in_stderr('bitcoind has gone backwards')
|
||||
@@ -1252,7 +1252,7 @@ def test_bitcoind_goes_backwards(node_factory, bitcoind):
|
||||
l1.daemon.opts['rescan'] = 3
|
||||
|
||||
# Will simply refuse to start.
|
||||
l1.daemon.start(wait_for_initialized=False)
|
||||
l1.daemon.start(wait_for_initialized=False, stderr_redir=True)
|
||||
# Will exit with failure code.
|
||||
assert l1.daemon.wait() == 1
|
||||
assert l1.daemon.is_in_stderr('bitcoind has gone backwards')
|
||||
|
||||
Reference in New Issue
Block a user