mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
qa: Match full plain text by default
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
import os
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.test_node import ErrorMatch
|
||||
|
||||
|
||||
class LoggingTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
@@ -31,7 +33,7 @@ class LoggingTest(BitcoinTestFramework):
|
||||
invalidname = os.path.join("foo", "foo.log")
|
||||
self.stop_node(0)
|
||||
exp_stderr = "Error: Could not open debug log file \S+$"
|
||||
self.nodes[0].assert_start_raises_init_error(["-debuglogfile=%s" % (invalidname)], exp_stderr)
|
||||
self.nodes[0].assert_start_raises_init_error(["-debuglogfile=%s" % (invalidname)], exp_stderr, match=ErrorMatch.FULL_REGEX)
|
||||
assert not os.path.isfile(os.path.join(invdir, "foo.log"))
|
||||
|
||||
# check that invalid log (relative) works after path exists
|
||||
@@ -44,7 +46,7 @@ class LoggingTest(BitcoinTestFramework):
|
||||
self.stop_node(0)
|
||||
invdir = os.path.join(self.options.tmpdir, "foo")
|
||||
invalidname = os.path.join(invdir, "foo.log")
|
||||
self.nodes[0].assert_start_raises_init_error(["-debuglogfile=%s" % invalidname], exp_stderr)
|
||||
self.nodes[0].assert_start_raises_init_error(["-debuglogfile=%s" % invalidname], exp_stderr, match=ErrorMatch.FULL_REGEX)
|
||||
assert not os.path.isfile(os.path.join(invdir, "foo.log"))
|
||||
|
||||
# check that invalid log (absolute) works after path exists
|
||||
|
Reference in New Issue
Block a user