Fix verify_master_failure
The test expected the wrong error message to be in the log. To better cope with changes in the text, the test now uses a regular expression to do the matching.
This commit is contained in:
@ -43,6 +43,7 @@ class TestConnections
|
||||
private:
|
||||
/** Whether timeouts are enabled or not */
|
||||
bool enable_timeouts;
|
||||
bool log_matches(const char* pattern);
|
||||
public:
|
||||
/**
|
||||
* @brief TestConnections constructor: reads environmental variables, copies MaxScale.cnf for MaxScale machine
|
||||
@ -634,6 +635,22 @@ public:
|
||||
*/
|
||||
void check_log_err(const char * err_msg, bool expected);
|
||||
|
||||
/**
|
||||
* @brief Check whether logs match a pattern
|
||||
*
|
||||
* The patterns are interpreted as `grep` compatible patterns (BRE regular expressions). If the
|
||||
* log file does not match the pattern, it is considered an error.
|
||||
*/
|
||||
void log_includes(const char* pattern);
|
||||
|
||||
/**
|
||||
* @brief Check whether logs do not match a pattern
|
||||
*
|
||||
* The patterns are interpreted as `grep` compatible patterns (BRE regular expressions). If the
|
||||
* log file match the pattern, it is considered an error.
|
||||
*/
|
||||
void log_excludes(const char* pattern);
|
||||
|
||||
/**
|
||||
* @brief FindConnectedSlave Finds slave node which has connections from MaxScale
|
||||
* @param Test TestConnections object which contains info about test setup
|
||||
|
||||
Reference in New Issue
Block a user