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:
parent
4c3c19d943
commit
b0c3995393
1 changed files with 13 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue