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:
Markus Mäkelä
2019-04-18 14:33:18 +03:00
parent 5e6107d451
commit d60ec9e281

View File

@ -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));