test: -nodebug clears previously set debug options

This commit is contained in:
Daniela Brozzoni 2025-02-10 17:46:55 +01:00
parent 809d7e763c
commit d39d521d86
No known key found for this signature in database
GPG key ID: 7DE4F1FDCED0AB87

View file

@ -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()