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

@ -21,7 +21,7 @@ int main(int argc, char *argv[])
* The monitor needs to be stopped before the slaves are stopped to prevent
* it from detecting the broken replication.
*/
test.ssh_maxscale(true, "maxadmin shutdown monitor MySQL-Monitor");
test.maxscales->ssh_node(0, "maxadmin shutdown monitor \"MySQL Monitor\"", true);
// Stop slaves and drop the user on the master
test.repl->stop_slaves();
test.repl->connect();
@ -29,12 +29,14 @@ int main(int argc, char *argv[])
test.repl->close_connections();
test.set_timeout(60);
MYSQL* conn = open_conn_db(test.rwsplit_port, test.maxscale_ip(), "test", "auth_test", "test", false);
MYSQL* conn = open_conn_db(test.maxscales->rwsplit_port[0], test.maxscales->ip(0), "test", "auth_test",
"test", false);
test.add_result(mysql_errno(conn) == 0, "Connection with users from master should fail");
mysql_close(conn);
test.ssh_maxscale(true, "maxadmin remove server server1 RW-Split-Router");
conn = open_conn_db(test.rwsplit_port, test.maxscale_ip(), "test", "auth_test", "test", false);
test.maxscales->ssh_node(0, "maxadmin remove server server1 \"RW Split Router\"", true);
conn = open_conn_db(test.maxscales->rwsplit_port[0], test.maxscales->ip(0), "test", "auth_test", "test",
false);
test.add_result(mysql_errno(conn), "Connection should be OK: %s", mysql_error(conn));
test.try_query(conn, "SELECT 1");
mysql_close(conn);