Skip to content

Commit d39d521

Browse files
test: -nodebug clears previously set debug options
1 parent 809d7e7 commit d39d521

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/functional/feature_logging.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ def run_test(self):
9999
match=ErrorMatch.PARTIAL_REGEX,
100100
)
101101

102+
self.log.info("Test that -nodebug clears previously specified debug options")
103+
disable_debug_options = [
104+
'-nodebug'
105+
]
106+
107+
for disable_debug_opt in disable_debug_options:
108+
# Every category before disable_debug_opt will be ignored, including the invalid 'abc'
109+
self.restart_node(0, ['-debug=http', '-debug=abc', disable_debug_opt, '-debug=rpc', '-debug=net'])
110+
logging = self.nodes[0].logging()
111+
assert not logging['http']
112+
assert 'abc' not in logging
113+
assert logging['rpc']
114+
assert logging['net']
102115

103116
if __name__ == '__main__':
104117
LoggingTest(__file__).main()

0 commit comments

Comments
 (0)