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:
Rusty Russell
2022-07-21 14:09:30 +09:30
committed by neil saitug
parent aaf743e438
commit 4cada557ba
6 changed files with 35 additions and 28 deletions

View File

@@ -425,7 +425,7 @@ def test_db_sanity_checks(bitcoind, node_factory):
# Provide the --wallet option and start with wrong db
l1.daemon.opts['wallet'] = "sqlite3://" + l2.db.path
l1.daemon.start(wait_for_initialized=False)
l1.daemon.start(wait_for_initialized=False, stderr_redir=True)
l1.daemon.wait_for_log(r'\*\*BROKEN\*\* wallet: Wallet node_id does not match HSM')
# Will have exited with non-zero status.
assert l1.daemon.proc.wait(TIMEOUT) != 0
@@ -435,7 +435,7 @@ def test_db_sanity_checks(bitcoind, node_factory):
l1.daemon.opts['wallet'] = "sqlite3://" + l1.db.path
l1.daemon.opts['network'] = "bitcoin"
l1.daemon.start(wait_for_initialized=False)
l1.daemon.start(wait_for_initialized=False, stderr_redir=True)
l1.daemon.wait_for_log(r'\*\*BROKEN\*\* wallet: Wallet blockchain hash does not match network blockchain hash')
# Will have exited with non-zero status.
assert l1.daemon.proc.wait(TIMEOUT) != 0