Fix config parameter related tests
The tests gave null arguments when a valid object was expected.
This commit is contained in:
@ -38,7 +38,12 @@
|
|||||||
|
|
||||||
#include "../internal/filter.hh"
|
#include "../internal/filter.hh"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
MXS_CONFIG_PARAMETER empty;
|
||||||
|
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* test1 Filter creation, finding and deletion
|
* test1 Filter creation, finding and deletion
|
||||||
*
|
*
|
||||||
@ -47,7 +52,7 @@ static int test1()
|
|||||||
{
|
{
|
||||||
SFilterDef f1, f2;
|
SFilterDef f1, f2;
|
||||||
|
|
||||||
if ((f1 = filter_alloc("test1", "qlafilter", NULL)) == NULL)
|
if ((f1 = filter_alloc("test1", "qlafilter", &empty)) == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "filter_alloc: test 1 failed.\n");
|
fprintf(stderr, "filter_alloc: test 1 failed.\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -79,7 +84,7 @@ static int test2()
|
|||||||
{
|
{
|
||||||
SFilterDef f1;
|
SFilterDef f1;
|
||||||
|
|
||||||
if ((f1 = filter_alloc("test1", "qlafilter", NULL)) == NULL)
|
if ((f1 = filter_alloc("test1", "qlafilter", &empty)) == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "filter_alloc: test 1 failed.\n");
|
fprintf(stderr, "filter_alloc: test 1 failed.\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -103,7 +108,7 @@ static int test3()
|
|||||||
for (i = 0; i < n_filters; i++)
|
for (i = 0; i < n_filters; i++)
|
||||||
{
|
{
|
||||||
sprintf(name, "filter%d", i);
|
sprintf(name, "filter%d", i);
|
||||||
if ((f1 = filter_alloc(name, "qlafilter", NULL)) == NULL)
|
if ((f1 = filter_alloc(name, "qlafilter", &empty)) == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"filter_alloc: test 3 failed with %s.\n",
|
"filter_alloc: test 3 failed with %s.\n",
|
||||||
|
@ -407,7 +407,8 @@ int test_domain_matching(const char* actual_module,
|
|||||||
/** Create a monitor */
|
/** Create a monitor */
|
||||||
char* libdir = MXS_STRDUP_A("../../modules/monitor/mariadbmon/");
|
char* libdir = MXS_STRDUP_A("../../modules/monitor/mariadbmon/");
|
||||||
set_libdir(libdir);
|
set_libdir(libdir);
|
||||||
MonitorManager::create_monitor(name, actual_module, NULL);
|
MXS_CONFIG_PARAMETER empty;
|
||||||
|
MonitorManager::create_monitor(name, actual_module, &empty);
|
||||||
|
|
||||||
const MODULECMD* cmd;
|
const MODULECMD* cmd;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user