From d60ec9e281005e9dd6a816c0fd459733385a38a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 18 Apr 2019 14:33:18 +0300 Subject: [PATCH] Fix test_config2 If the /etc/maxscale.modules.d/ didn't exist or wasn't accessable by the current user, the test would fail. --- server/core/test/test_config2.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/core/test/test_config2.cc b/server/core/test/test_config2.cc index c0ab31a49..34a70815d 100644 --- a/server/core/test/test_config2.cc +++ b/server/core/test/test_config2.cc @@ -238,12 +238,15 @@ int test_enum(config::Enum& value) int test_path(config::Path& value) { + char path[PATH_MAX]; + getcwd(path, sizeof(path)); + static const TestEntry entries[] = { - { ".", true, "." }, - { "/tmp", true, "/tmp" }, + {path, true, path}, + {"/tmp", true, "/tmp"}, - { "non-existent", false } + {"non-existent", false} }; return test(value, entries, elements_in_array(entries));