You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #12718: [Tests] Require exact match in assert_start_raises_init_eror (jnewbery)
fae1374 qa: Allow for partial_match when checking init error (MarcoFalke)
5812273 [Tests] Require exact match in assert_start_raises_init_eror() (John Newbery)
0ec08a6 [Tests] Move assert_start_raises_init_error method to TestNode (John Newbery)
Pull request description:
Extracted from #12379, because the changes are important on their own.
This allows for exact testing, since the match can be specified with a strict regex. Internal details (such as exact formatting of the error message) can still be fuzzed away by regex wildcards.
Tree-SHA512: 605d2c9c42362a32d42321b066637577a026d0bb8cfc1c9f5737a4ca6503ffe85457a5122cea6e1101053ccc6c8aa1bbae3602e1fa7d2988bf7d5c275f412f66
# Check that using -datadir argument on non-existent directory fails
27
28
self.nodes[0].datadir=new_data_dir
28
-
self.assert_start_raises_init_error(0, ['-datadir='+new_data_dir], 'Error: Specified data directory "'+new_data_dir+'" does not exist.')
29
+
self.nodes[0].assert_start_raises_init_error(['-datadir='+new_data_dir], 'Error: Specified data directory "'+re.escape(new_data_dir)+'" does not exist.')
29
30
30
31
# Check that using non-existent datadir in conf file fails
self.assert_start_raises_init_error(0, ['-conf='+conf_file], 'Error reading configuration file: specified data directory "'+new_data_dir+'" does not exist.')
35
+
self.nodes[0].assert_start_raises_init_error(['-conf='+conf_file], 'Error reading configuration file: specified data directory "'+re.escape(new_data_dir)+'" does not exist.')
35
36
36
37
# Create the directory and ensure the config file now works
0 commit comments