0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

test: -debug and -debugexclude raise on invalid values

This commit is contained in:
Jon Atack 2023-05-12 00:42:02 +02:00
parent 4c3c19d943
commit b0c3995393

View file

@ -69,6 +69,19 @@ class LoggingTest(BitcoinTestFramework):
# just sanity check no crash here
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__':
LoggingTest().main()