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

@ -1,7 +1,7 @@
/**
* @file bug730.cpp regression case for bug 730 ("Regex filter and shorter than original replacement queries MaxScale")
*
* - setup regex filter, add it to all routers
* - setup regex filter, add it to all maxscales->routers[0]
* @verbatim
[MySetOptionFilter]
type=filter
@ -11,7 +11,7 @@ match=SET OPTION SQL_QUOTE_SHOW_CREATE
replace=SET SQL_QUOTE_SHOW_CREATE
@endverbatim
* - try SET OPTION SQL_QUOTE_SHOW_CREATE = 1; against all routers
* - try SET OPTION SQL_QUOTE_SHOW_CREATE = 1; against all maxscales->routers[0]
* - check if Maxscale alive
*/
@ -45,21 +45,21 @@ int main(int argc, char *argv[])
TestConnections * Test = new TestConnections(argc, argv);
Test->set_timeout(10);
Test->connect_maxscale();
Test->maxscales->connect_maxscale(0);
Test->tprintf("RWSplit: \n");
fflush(stdout);
Test->try_query(Test->conn_rwsplit, (char *) "SET OPTION SQL_QUOTE_SHOW_CREATE = 1;");
Test->try_query(Test->maxscales->conn_rwsplit[0], (char *) "SET OPTION SQL_QUOTE_SHOW_CREATE = 1;");
Test->tprintf("ReadConn master: \n");
fflush(stdout);
Test->try_query(Test->conn_master, (char *) "SET OPTION SQL_QUOTE_SHOW_CREATE = 1;");
Test->try_query(Test->maxscales->conn_master[0], (char *) "SET OPTION SQL_QUOTE_SHOW_CREATE = 1;");
Test->tprintf("readConn slave: \n");
fflush(stdout);
Test->try_query(Test->conn_slave, (char *) "SET OPTION SQL_QUOTE_SHOW_CREATE = 1;");
Test->try_query(Test->maxscales->conn_slave[0], (char *) "SET OPTION SQL_QUOTE_SHOW_CREATE = 1;");
Test->close_maxscale_connections();
Test->maxscales->close_maxscale_connections(0);
Test->check_maxscale_alive();
Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;