Add test case for ignore_external_masters + failover

The test checks that failover works even when the master of the monitored
cluster is a slave to an external masters. The test also verifies that the
servers do not get unexpected status labels.
This commit is contained in:
Markus Mäkelä
2018-02-07 00:41:49 +02:00
parent 8bf756ca56
commit 6a1aba70e7
9 changed files with 241 additions and 34 deletions

View File

@ -25,28 +25,6 @@ void change_master(TestConnections& test, int slave, int master, const char* nam
source.c_str(), test.repl->IP[master], test.repl->user_name, test.repl->password, source.c_str());
}
std::string dump_status(const StringSet& current, const StringSet& expected)
{
std::stringstream ss;
ss << "Current status: (";
for (const auto& a: current)
{
ss << a << ",";
}
ss << ") Expected status: (";
for (const auto& a: expected)
{
ss << a << ",";
}
ss << ")";
return ss.str();
}
void check_status(TestConnections& test, const StringSet& expected_master, const StringSet& expected_slave)
{
sleep(2);