mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-13 00:56:57 +02:00
test: -nodebug
clears previously set debug options
This commit is contained in:
@ -99,6 +99,19 @@ class LoggingTest(BitcoinTestFramework):
|
||||
match=ErrorMatch.PARTIAL_REGEX,
|
||||
)
|
||||
|
||||
self.log.info("Test that -nodebug clears previously specified debug options")
|
||||
disable_debug_options = [
|
||||
'-nodebug'
|
||||
]
|
||||
|
||||
for disable_debug_opt in disable_debug_options:
|
||||
# Every category before disable_debug_opt will be ignored, including the invalid 'abc'
|
||||
self.restart_node(0, ['-debug=http', '-debug=abc', disable_debug_opt, '-debug=rpc', '-debug=net'])
|
||||
logging = self.nodes[0].logging()
|
||||
assert not logging['http']
|
||||
assert 'abc' not in logging
|
||||
assert logging['rpc']
|
||||
assert logging['net']
|
||||
|
||||
if __name__ == '__main__':
|
||||
LoggingTest(__file__).main()
|
||||
|
Reference in New Issue
Block a user