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