Fix test_config2
If the /etc/maxscale.modules.d/ didn't exist or wasn't accessable by the current user, the test would fail.
This commit is contained in:
@ -238,12 +238,15 @@ int test_enum(config::Enum<Enum>& value)
|
|||||||
|
|
||||||
int test_path(config::Path& value)
|
int test_path(config::Path& value)
|
||||||
{
|
{
|
||||||
|
char path[PATH_MAX];
|
||||||
|
getcwd(path, sizeof(path));
|
||||||
|
|
||||||
static const TestEntry<config::Path::value_type> entries[] =
|
static const TestEntry<config::Path::value_type> entries[] =
|
||||||
{
|
{
|
||||||
{ ".", true, "." },
|
{path, true, path},
|
||||||
{ "/tmp", true, "/tmp" },
|
{"/tmp", true, "/tmp"},
|
||||||
|
|
||||||
{ "non-existent", false }
|
{"non-existent", false}
|
||||||
};
|
};
|
||||||
|
|
||||||
return test(value, entries, elements_in_array(entries));
|
return test(value, entries, elements_in_array(entries));
|
||||||
|
|||||||
Reference in New Issue
Block a user