MXS-3031 Add function for resetting users
With this function, a test that changes the default test users on a node can reset the situation.
This commit is contained in:
parent
c9badcb09c
commit
9955f00bf5
@ -240,6 +240,13 @@ public:
|
||||
// Create the default users used by all tests
|
||||
void create_users(int node);
|
||||
|
||||
/**
|
||||
* Create the default users used by all tests on all nodes.
|
||||
*
|
||||
* @return 0 in case of success.
|
||||
*/
|
||||
int create_users();
|
||||
|
||||
/**
|
||||
* @brif BlockNode setup firewall on a backend node to block MariaDB port
|
||||
* @param node Index of node to block
|
||||
|
@ -379,6 +379,22 @@ void Mariadb_nodes::create_users(int node)
|
||||
user_name, password, access_homedir[0], socket_cmd[0]);
|
||||
}
|
||||
|
||||
int Mariadb_nodes::create_users()
|
||||
{
|
||||
for (int i = 0; i < N; i++)
|
||||
{
|
||||
if (start_node(i, (char*) ""))
|
||||
{
|
||||
printf("Start of node %d failed\n", i);
|
||||
return 1;
|
||||
}
|
||||
|
||||
create_users(i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Mariadb_nodes::start_replication()
|
||||
{
|
||||
int local_result = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user