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

@ -8,13 +8,13 @@ int main(int argc, char** argv)
{
TestConnections test(argc, argv);
MYSQL *mysql = open_conn(test.rwsplit_port, test.maxscale_IP, "testuser", NULL, false);
MYSQL *mysql = open_conn(test.maxscales->rwsplit_port[0], test.maxscales->IP[0], "testuser", NULL, false);
test.add_result(mysql_errno(mysql) == 0, "Connecting to MaxScale should fail");
test.add_result(strstr(mysql_error(mysql), "using password: NO") == NULL, "Missing (using password: NO) error message, got this instead: %s", mysql_error(mysql));
test.tprintf("MySQL error: %s", mysql_error(mysql));
mysql_close(mysql);
open_conn(test.rwsplit_port, test.maxscale_IP, "testuser", "testpassword", false);
open_conn(test.maxscales->rwsplit_port[0], test.maxscales->IP[0], "testuser", "testpassword", false);
test.add_result(mysql_errno(mysql) == 0, "Connecting to MaxScale should fail");
test.add_result(strstr(mysql_error(mysql), "using password: YES") == NULL, "Missing (using password: YES) error message, got this instead: %s", mysql_error(mysql));
test.tprintf("MySQL error: %s", mysql_error(mysql));