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

@ -13,14 +13,14 @@
int main(int argc, char *argv[])
{
TestConnections * test = new TestConnections(argc, argv);
test->connect_maxscale();
test->add_result(execute_query_check_one(test->conn_rwsplit, "SELECT 123", "0"),
test->maxscales->connect_maxscale(0);
test->add_result(execute_query_check_one(test->maxscales->conn_rwsplit[0], "SELECT 123", "0"),
"Query to first service should have replaced the query.\n");
test->add_result(execute_query_check_one(test->conn_slave, "SELECT 123", "123"),
test->add_result(execute_query_check_one(test->maxscales->conn_slave[0], "SELECT 123", "123"),
"Query to second service should not have replaced the query.\n");
test->add_result(execute_query_check_one(test->conn_master, "SELECT 123", "123"),
test->add_result(execute_query_check_one(test->maxscales->conn_master[0], "SELECT 123", "123"),
"Query to third service should not have replaced the query.\n");
test->close_maxscale_connections();
test->maxscales->close_maxscale_connections(0);
int rval = test->global_result;
delete test;
return rval;