refactored tests (#147)

This commit is contained in:
Timofey Turenko
2017-12-08 12:23:04 +02:00
committed by GitHub
parent c6daf8c26b
commit 3c88bf1ec6
253 changed files with 5265 additions and 3649 deletions

View File

@ -19,15 +19,17 @@ int main(int argc, char** argv)
TestConnections::skip_maxscale_start(true);
TestConnections test(argc, argv);
test.ssh_maxscale(true, "mkdir -p /home/vagrant/rules/; chown -R vagrant:vagrant /home/vagrant/rules/");
test.copy_to_maxscale((char*)"rules.txt", (char*)"~/rules/rules.txt");
test.ssh_maxscale(true, "chmod a+r /home/vagrant/rules/rules.txt;");
test.maxscales->ssh_node(0, "mkdir -p /home/vagrant/rules/; chown -R vagrant:vagrant /home/vagrant/rules/",
true);
test.maxscales->copy_to_node_legacy((char*)"rules.txt", (char*)"~/rules/rules.txt", 0);
test.maxscales->ssh_node(0, "chmod a+r /home/vagrant/rules/rules.txt;", true);
test.restart_maxscale();
test.connect_maxscale();
test.maxscales->restart_maxscale(0);
test.maxscales->connect_maxscale(0);
test.tprintf("Pinging MaxScale, expecting success");
test.add_result(mysql_ping(test.conn_rwsplit), "Ping should not fail: %s", mysql_error(test.conn_rwsplit));
test.close_maxscale_connections();
test.add_result(mysql_ping(test.maxscales->conn_rwsplit[0]), "Ping should not fail: %s",
mysql_error(test.maxscales->conn_rwsplit[0]));
test.maxscales->close_maxscale_connections(0);
return test.global_result;
}