Files
MaxScale/maxscale-system-test/config_test.cpp
Esa Korhonen c6a9c8bb0f MXS-2900 Cleanup system test information generation
The system test information array now has the full path to the MaxScale
configuration file. The array now only contains labels given in
CMakeLists.txt. The resulting .cc-file has linebreaks for readability.
2020-03-31 13:38:45 +03:00

55 lines
1.0 KiB
C++

/**
* Bad configuration test
*/
#include <iostream>
#include <unistd.h>
#include "testconnections.h"
using std::string;
const char* bad_configs[] =
{
"bug359",
"bug495",
"bug526",
"bug479",
"bug493",
"bad_ssl",
"mxs710_bad_socket",
"mxs711_two_ports",
"mxs720_line_with_no_equal",
"mxs720_wierd_line",
"mxs799",
"mxs1731_empty_param",
// passwd is still supported
// "old_passwd",
NULL
};
int main(int argc, char** argv)
{
TestConnections* test = new TestConnections(argc, argv);
int rval = 0;
test->maxscales->stop_maxscale(0);
for (int i = 0; bad_configs[i]; i++)
{
string config_file_path = (string)test_dir + "/cnf/maxscale.cnf.template." + bad_configs[i];
printf("Testing %s...\n", config_file_path.c_str());
if (test->test_bad_config(0, config_file_path))
{
printf("FAILED\n");
rval++;
}
else
{
printf("SUCCESS\n");
}
}
return rval;
}