mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-21 15:22:53 +02:00
test: -debug and -debugexclude raise on invalid values
This commit is contained in:
@ -69,6 +69,19 @@ class LoggingTest(BitcoinTestFramework):
|
|||||||
# just sanity check no crash here
|
# just sanity check no crash here
|
||||||
self.restart_node(0, [f"-debuglogfile={os.devnull}"])
|
self.restart_node(0, [f"-debuglogfile={os.devnull}"])
|
||||||
|
|
||||||
|
self.log.info("Test -debug and -debugexclude raise when invalid values are passed")
|
||||||
|
self.stop_node(0)
|
||||||
|
self.nodes[0].assert_start_raises_init_error(
|
||||||
|
extra_args=["-debug=abc"],
|
||||||
|
expected_msg="Error: Unsupported logging category -debug=abc.",
|
||||||
|
match=ErrorMatch.FULL_REGEX,
|
||||||
|
)
|
||||||
|
self.nodes[0].assert_start_raises_init_error(
|
||||||
|
extra_args=["-debugexclude=abc"],
|
||||||
|
expected_msg="Error: Unsupported logging category -debugexclude=abc.",
|
||||||
|
match=ErrorMatch.FULL_REGEX,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
LoggingTest().main()
|
LoggingTest().main()
|
||||||
|
Reference in New Issue
Block a user