From b0c3995393c592fa96306e077ed64e65d5400882 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Fri, 12 May 2023 00:42:02 +0200 Subject: [PATCH] test: -debug and -debugexclude raise on invalid values --- test/functional/feature_logging.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/functional/feature_logging.py b/test/functional/feature_logging.py index fe4f02dfe62..a33aa043f8b 100755 --- a/test/functional/feature_logging.py +++ b/test/functional/feature_logging.py @@ -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()