refactored tests (#147)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user