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

@ -2,7 +2,7 @@
* @file mxs652_bad_ssl.cpp mxs652 regression case ("ssl is configured in a wrong way, but Maxscale can be started and works")
*
* - Maxscale.cnf contains ssl configuration for all services in 'router' section instead of 'listener' with 'ssl=require'
* - trying to connect to all routers without ssl and expect error
* - trying to connect to all maxscales->routers[0] without ssl and expect error
*/
@ -17,11 +17,11 @@ int main(int argc, char *argv[])
{
TestConnections * Test = new TestConnections(argc, argv);
Test->set_timeout(10);
Test->check_log_err((char *) "Unexpected parameter 'ssl_version'", true);
Test->check_log_err(0, (char *) "Unexpected parameter 'ssl_version'", true);
Test->tprintf("Trying RWSplit, expecting fault\n");
MYSQL * conn = open_conn(Test->rwsplit_port, Test->maxscale_IP, Test->maxscale_user, Test->maxscale_password,
MYSQL * conn = open_conn(Test->maxscales->rwsplit_port[0], Test->maxscales->IP[0], Test->maxscales->user_name, Test->maxscales->password,
false);
if (mysql_errno(conn) == 0)
@ -31,7 +31,7 @@ int main(int argc, char *argv[])
}
Test->tprintf("Trying ReadConn master, expecting fault\n");
conn = open_conn(Test->readconn_master_port, Test->maxscale_IP, Test->maxscale_user, Test->maxscale_password,
conn = open_conn(Test->maxscales->readconn_master_port[0], Test->maxscales->IP[0], Test->maxscales->user_name, Test->maxscales->password,
false);
if (mysql_errno(conn) == 0)
@ -41,7 +41,7 @@ int main(int argc, char *argv[])
}
Test->tprintf("Trying ReadConn slave, expecting fault\n");
conn = open_conn(Test->readconn_slave_port, Test->maxscale_IP, Test->maxscale_user, Test->maxscale_password,
conn = open_conn(Test->maxscales->readconn_slave_port[0][0], Test->maxscales->IP[0], Test->maxscales->user_name, Test->maxscales->password,
false);
if (mysql_errno(conn) == 0)