MXS-2243_labels Maxscale system tests prepare environment by themselves

maxscale-system-test changed in order to control test environment by itself.
Every test checks which machines are running, compare with list of needed machines
and start new VMs is they are missing in the running machines list.
Tests are executiong MDBCI commands, MDBCI executable should be in the PATH
This commit is contained in:
Timofey Turenko
2019-03-28 22:37:24 +02:00
parent 04f70879d2
commit fb96141dda
98 changed files with 1394 additions and 1660 deletions

View File

@ -92,8 +92,8 @@ int main(int argc, char** argv)
int ec;
string rejoin_s3 = REJOIN_CMD + " server3";
string rejoin_s4 = REJOIN_CMD + " server4";
test.maxscales->ssh_node_output(0, rejoin_s3.c_str() , true, &ec);
test.maxscales->ssh_node_output(0, rejoin_s4.c_str() , true, &ec);
test.maxscales->ssh_node_output(0, rejoin_s3.c_str(), true, &ec);
test.maxscales->ssh_node_output(0, rejoin_s4.c_str(), true, &ec);
test.maxscales->wait_for_monitor();
get_output(test);
@ -117,8 +117,8 @@ int main(int argc, char** argv)
mysql_query(nodes[0], "START SLAVE;");
test.maxscales->wait_for_monitor();
string rejoin_s2 = REJOIN_CMD + " server2";
test.maxscales->ssh_node_output(0, rejoin_s2.c_str() , true, &ec);
test.maxscales->ssh_node_output(0, rejoin_s3.c_str() , true, &ec);
test.maxscales->ssh_node_output(0, rejoin_s2.c_str(), true, &ec);
test.maxscales->ssh_node_output(0, rejoin_s3.c_str(), true, &ec);
test.maxscales->wait_for_monitor();
get_output(test);
int master_id = get_master_server_id(test);
@ -131,7 +131,7 @@ int main(int argc, char** argv)
{
int ec;
test.maxscales->ssh_node_output(0,
"maxadmin call command mysqlmon switchover MySQL-Monitor server1 server4" , true, &ec);
"maxadmin call command mysqlmon switchover MySQL-Monitor server1 server4", true, &ec);
test.maxscales->wait_for_monitor();
master_id = get_master_server_id(test);
test.expect(master_id == 1, "Server 1 should be the cluster master.");