Add tests from develop

Added tests from develop. The test results need to be modified for 2.0.
This commit is contained in:
Markus Mäkelä
2017-05-26 15:40:40 +03:00
parent ad109408b5
commit d7d4ec29bb
596 changed files with 48543 additions and 0 deletions

View File

@ -0,0 +1,27 @@
/**
* @file regexfilter1.cpp Simple regexfilter tests; aslo regression case for mxs508 ("regex filter ignores username")
*
* Three services are configured with regexfilter, each with different parameters.
* All services are queried with SELECT 123. The first service should replace it
* with SELECT 0 and the second and third services should not replace it.
*/
#include <iostream>
#include "testconnections.h"
int main(int argc, char *argv[])
{
TestConnections * test = new TestConnections(argc, argv);
test->connect_maxscale();
test->add_result(execute_query_check_one(test->conn_rwsplit, "SELECT 123", "0"),
"Query to first service should have replaced the query.\n");
test->add_result(execute_query_check_one(test->conn_slave, "SELECT 123", "123"),
"Query to second service should not have replaced the query.\n");
test->add_result(execute_query_check_one(test->conn_master, "SELECT 123", "123"),
"Query to third service should not have replaced the query.\n");
test->close_maxscale_connections();
int rval = test->global_result;
delete test;
return rval;
}