Uncrustify maxscale
See script directory for method. The script to run in the top level MaxScale directory is called maxscale-uncrustify.sh, which uses another script, list-src, from the same directory (so you need to set your PATH). The uncrustify version was 0.66.
This commit is contained in:
@ -7,18 +7,22 @@
|
||||
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
TestConnections* Test = new TestConnections(argc, argv);
|
||||
|
||||
Test->tprintf("Creating user 'user' with 3 different passwords for different hosts\n");
|
||||
Test->maxscales->connect_maxscale(0);
|
||||
execute_query(Test->maxscales->conn_rwsplit[0], "CREATE USER 'user'@'non_existing_host1' IDENTIFIED BY 'pass1'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0],
|
||||
"CREATE USER 'user'@'non_existing_host1' IDENTIFIED BY 'pass1'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0], "CREATE USER 'user'@'%%' IDENTIFIED BY 'pass2'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0], "CREATE USER 'user'@'non_existing_host2' IDENTIFIED BY 'pass3'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0], "GRANT ALL PRIVILEGES ON *.* TO 'user'@'non_existing_host1'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0],
|
||||
"CREATE USER 'user'@'non_existing_host2' IDENTIFIED BY 'pass3'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0],
|
||||
"GRANT ALL PRIVILEGES ON *.* TO 'user'@'non_existing_host1'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0], "GRANT ALL PRIVILEGES ON *.* TO 'user'@'%%'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0], "GRANT ALL PRIVILEGES ON *.* TO 'user'@'non_existing_host2'");
|
||||
execute_query(Test->maxscales->conn_rwsplit[0],
|
||||
"GRANT ALL PRIVILEGES ON *.* TO 'user'@'non_existing_host2'");
|
||||
|
||||
Test->tprintf("Synchronizing slaves");
|
||||
Test->set_timeout(50);
|
||||
@ -26,7 +30,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
Test->tprintf("Trying first hostname, expecting failure");
|
||||
Test->set_timeout(15);
|
||||
MYSQL * conn = open_conn(Test->maxscales->rwsplit_port[0], Test->maxscales->IP[0], (char *) "user", (char *) "pass1", Test->ssl);
|
||||
MYSQL* conn = open_conn(Test->maxscales->rwsplit_port[0],
|
||||
Test->maxscales->IP[0],
|
||||
(char*) "user",
|
||||
(char*) "pass1",
|
||||
Test->ssl);
|
||||
if (mysql_errno(conn) == 0)
|
||||
{
|
||||
Test->add_result(1, "MaxScale ignores host in authentication\n");
|
||||
@ -38,7 +46,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
Test->tprintf("Trying second hostname, expecting success");
|
||||
Test->set_timeout(15);
|
||||
conn = open_conn(Test->maxscales->rwsplit_port[0], Test->maxscales->IP[0], (char *) "user", (char *) "pass2", Test->ssl);
|
||||
conn = open_conn(Test->maxscales->rwsplit_port[0],
|
||||
Test->maxscales->IP[0],
|
||||
(char*) "user",
|
||||
(char*) "pass2",
|
||||
Test->ssl);
|
||||
Test->add_result(mysql_errno(conn), "MaxScale can't connect: %s\n", mysql_error(conn));
|
||||
if (conn != NULL)
|
||||
{
|
||||
@ -47,7 +59,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
Test->tprintf("Trying third hostname, expecting failure");
|
||||
Test->set_timeout(15);
|
||||
conn = open_conn(Test->maxscales->rwsplit_port[0], Test->maxscales->IP[0], (char *) "user", (char *) "pass3", Test->ssl);
|
||||
conn = open_conn(Test->maxscales->rwsplit_port[0],
|
||||
Test->maxscales->IP[0],
|
||||
(char*) "user",
|
||||
(char*) "pass3",
|
||||
Test->ssl);
|
||||
if (mysql_errno(conn) == 0)
|
||||
{
|
||||
Test->add_result(1, "MaxScale ignores host in authentication\n");
|
||||
|
||||
Reference in New Issue
Block a user