refactored tests (#147)
This commit is contained in:
@ -42,17 +42,17 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
Test->set_timeout(50);
|
||||
Test->connect_maxscale();
|
||||
Test->maxscales->connect_maxscale(0);
|
||||
|
||||
Test->tprintf("Creating user with old style password\n");
|
||||
Test->try_query(Test->conn_rwsplit,
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0],
|
||||
(char *) "CREATE USER 'user_long_host11'@'very_long_hostname_that_probably_caused_crashhh.com.net.org' IDENTIFIED BY 'old'");
|
||||
Test->try_query(Test->conn_rwsplit,
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0],
|
||||
(char *) "GRANT ALL PRIVILEGES ON *.* TO 'user_long_host11'@'very_long_hostname_that_probably_caused_crashhh.com.net.org' WITH GRANT OPTION");
|
||||
sleep(10);
|
||||
|
||||
Test->tprintf("Trying to connect using user with old style password\n");
|
||||
MYSQL * conn = open_conn(Test->rwsplit_port, Test->maxscale_IP, (char *) "user_long_host11", (char *) "old",
|
||||
MYSQL * conn = open_conn(Test->maxscales->rwsplit_port[0], Test->maxscales->IP[0], (char *) "user_long_host11", (char *) "old",
|
||||
Test->ssl);
|
||||
|
||||
if ( mysql_errno(conn) != 0 )
|
||||
@ -68,11 +68,11 @@ int main(int argc, char *argv[])
|
||||
mysql_close(conn);
|
||||
}
|
||||
|
||||
Test->try_query(Test->conn_rwsplit,
|
||||
Test->try_query(Test->maxscales->conn_rwsplit[0],
|
||||
(char *) "DROP USER 'user_long_host11'@'very_long_hostname_that_probably_caused_crashhh.com.net.org'");
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user