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

@ -16,7 +16,7 @@ int compare_server_id(TestConnections* test, char *node_id)
{
char str[1024];
int rval = 0;
if (find_field(test->conn_rwsplit, "SELECT @@server_id", "@@server_id", str))
if (find_field(test->maxscales->conn_rwsplit[0], "SELECT @@server_id", "@@server_id", str))
{
test->tprintf("Failed to query for @@server_id.\n");
rval = 1;
@ -37,7 +37,7 @@ int main(int argc, char **argv)
sprintf(server_id, "%d", test->repl->get_server_id(1));
test->tprintf("Server ID of server2 is: %s\n", server_id);
test->add_result(test->connect_rwsplit(), "Test failed to connect to MaxScale.\n");
test->add_result(test->maxscales->connect_rwsplit(0), "Test failed to connect to MaxScale.\n");
test->add_result(compare_server_id(test, server_id), "Test failed, server ID was not correct.\n");
int rval = test->global_result;
delete test;