refactored tests (#147)
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user