2.1 fix restore (#151)

* refactor test backend fixing

* return comatibility with 5.5 for backend restore

* remove backend configuration scripts
This commit is contained in:
Timofey Turenko
2017-12-18 23:47:02 +02:00
committed by GitHub
parent ba24330d0f
commit 1a63e5ec7e
11 changed files with 449 additions and 173 deletions

View File

@ -18,13 +18,21 @@ int main(int argc, char *argv[])
Test->connect_maxscale();
Test->tprintf("Testing connections\n");
Test->add_result(Test->test_maxscale_connections(true, true, true), "Can't connect to backend\n");
Test->tprintf("Connecting to Maxscale router with Galera backend\n");
MYSQL * g_conn = open_conn(4016 , Test->maxscale_IP, Test->maxscale_user, Test->maxscale_password, Test->ssl);
if (g_conn != NULL )
if ((Test->galera != NULL) && (Test->galera->N != 0))
{
Test->tprintf("Testing connection\n");
Test->add_result(Test->try_query(g_conn, (char *) "SELECT 1"),
(char *) "Error executing query against RWSplit Galera\n");
Test->tprintf("Connecting to Maxscale router with Galera backend\n");
MYSQL * g_conn = open_conn(4016 , Test->maxscale_IP, Test->maxscale_user, Test->maxscale_password, Test->ssl);
if (g_conn != NULL )
{
Test->tprintf("Testing connection\n");
Test->add_result(Test->try_query(g_conn, (char *) "SELECT 1"),
(char *) "Error executing query against RWSplit Galera\n");
}
}
else
{
Test->tprintf("Galera is not in use\n");
}
Test->tprintf("Closing connections\n");
Test->close_maxscale_connections();
@ -43,7 +51,6 @@ int main(int argc, char *argv[])
Test->tprintf("Snapshots are not in use\n");
}
int rval = Test->global_result;
delete Test;
return rval;