Add proper cluster testing scripts

The scripts start MaxScale processes on two different servers. The support
framework for the tests is in place but the tests themselves still need to
be modified to allow the use of non-localhost addresses.
This commit is contained in:
Markus Mäkelä
2017-10-11 14:59:20 +03:00
parent 9617b55905
commit 47b1004134
6 changed files with 87 additions and 47 deletions

View File

@ -68,6 +68,25 @@ void TestConnections::multiple_maxscales(bool value)
maxscale::multiple_maxscales = value;
}
void TestConnections::set_secondary_maxscale(const char* ip_var, const char* ip6_var)
{
const char* ip = getenv(ip_var);
const char* ip6 = getenv(ip6_var);
if (ip || ip6)
{
TestConnections::multiple_maxscales(true);
if (ip)
{
setenv("maxscale2_IP", ip, 1);
}
if (ip6)
{
setenv("maxscale2_network6", ip6, 1);
}
}
}
TestConnections::TestConnections(int argc, char *argv[]):
enable_timeouts(true),
global_result(0),