Cleanup daemon and zones configuration 42/39542/2
authorDariusz Michaluk <d.michaluk@samsung.com>
Wed, 13 May 2015 14:19:26 +0000 (16:19 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Tue, 19 May 2015 09:11:59 +0000 (02:11 -0700)
[Feature]       Move unit tests configs to one directory.
                Remove unnecessary unit tests configs.
                Remove zoneTemplatePrefix from daemon config (zoneTemplateDir is used instead).
                Rename some configs.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests, run server.

Change-Id: Iabed6b7bfc1999296bcea89269195867d804c9ac

49 files changed:
packaging/vasum.spec
server/configs/daemon.conf.in
server/zone-admin.cpp
server/zone-admin.hpp
server/zone-config.hpp
server/zone.cpp
server/zone.hpp
server/zones-manager-config.hpp
server/zones-manager.cpp
tests/unit_tests/CMakeLists.txt
tests/unit_tests/client/configs/CMakeLists.txt [deleted file]
tests/unit_tests/client/ut-client.cpp
tests/unit_tests/configs/CMakeLists.txt [new file with mode: 0644]
tests/unit_tests/configs/dbus-1/system.d/org.tizen.vasum.tests.conf [moved from tests/unit_tests/server/configs/dbus-1/system.d/org.tizen.vasum.tests.conf with 100% similarity]
tests/unit_tests/configs/dbus/ut-dbus-system.conf [moved from tests/unit_tests/server/configs/ut-zones-manager/ut-dbus.conf with 100% similarity]
tests/unit_tests/configs/dbus/ut-dbus.conf [moved from tests/unit_tests/dbus/configs/ut-connection/ut-dbus.conf with 100% similarity]
tests/unit_tests/configs/provision/test-provision.conf [moved from tests/unit_tests/server/configs/ut-zone-provision/test.conf with 100% similarity]
tests/unit_tests/configs/systemd/vasum-socket-test.service [moved from tests/unit_tests/socket_test_service/configs/systemd/vasum-socket-test.service with 100% similarity]
tests/unit_tests/configs/systemd/vasum-socket-test.socket [moved from tests/unit_tests/socket_test_service/configs/systemd/vasum-socket-test.socket with 100% similarity]
tests/unit_tests/configs/templates/buggy-init.conf [moved from tests/unit_tests/server/configs/ut-zone-admin/templates/buggy.conf with 100% similarity]
tests/unit_tests/configs/templates/buggy-template.conf [moved from tests/unit_tests/server/configs/ut-zone/templates/buggy.conf with 100% similarity]
tests/unit_tests/configs/templates/console-dbus.conf.in [moved from tests/unit_tests/client/configs/ut-client/templates/console-dbus.conf.in with 76% similarity]
tests/unit_tests/configs/templates/console-ipc.conf.in [moved from tests/unit_tests/client/configs/ut-client/templates/console-ipc.conf.in with 92% similarity]
tests/unit_tests/configs/templates/default.conf [moved from tests/unit_tests/server/configs/ut-zone/templates/test.conf with 95% similarity]
tests/unit_tests/configs/templates/minimal.sh [moved from tests/unit_tests/lxc/templates/minimal-dbus.sh with 96% similarity]
tests/unit_tests/configs/templates/missing.conf [moved from tests/unit_tests/server/configs/ut-zone-admin/templates/missing.conf with 100% similarity]
tests/unit_tests/configs/templates/test-no-shutdown.conf [moved from tests/unit_tests/server/configs/ut-zone-admin/templates/test-no-shutdown.conf with 100% similarity]
tests/unit_tests/configs/test-daemon.conf.in [moved from tests/unit_tests/client/configs/ut-client/test-daemon.conf.in with 76% similarity]
tests/unit_tests/configs/utils/file.txt [moved from tests/unit_tests/utils/configs/ut-fs/file.txt with 100% similarity]
tests/unit_tests/dbus/configs/CMakeLists.txt [deleted file]
tests/unit_tests/dbus/ut-connection.cpp
tests/unit_tests/lxc/templates/CMakeLists.txt [deleted file]
tests/unit_tests/lxc/templates/minimal.sh [deleted file]
tests/unit_tests/server/configs/CMakeLists.txt [deleted file]
tests/unit_tests/server/configs/ut-server/templates/default.conf [deleted file]
tests/unit_tests/server/configs/ut-server/test-daemon.conf.in [deleted file]
tests/unit_tests/server/configs/ut-zone-admin/templates/test.conf [deleted file]
tests/unit_tests/server/configs/ut-zone/templates/test-dbus.conf.in [deleted file]
tests/unit_tests/server/configs/ut-zone/ut-dbus.conf [deleted file]
tests/unit_tests/server/configs/ut-zones-manager/templates/console.conf [deleted file]
tests/unit_tests/server/configs/ut-zones-manager/test-daemon.conf.in [deleted file]
tests/unit_tests/server/ut-server.cpp
tests/unit_tests/server/ut-zone-admin.cpp
tests/unit_tests/server/ut-zone-provision.cpp
tests/unit_tests/server/ut-zone.cpp
tests/unit_tests/server/ut-zones-manager.cpp
tests/unit_tests/socket_test_service/configs/CMakeLists.txt [deleted file]
tests/unit_tests/utils/configs/CMakeLists.txt [deleted file]
tests/unit_tests/utils/ut-fs.cpp

index 0f99f07..22a6363 100644 (file)
@@ -246,8 +246,12 @@ systemctl daemon-reload
 %attr(755,root,root) %{script_dir}/vsm_int_tests.py
 %attr(755,root,root) %{script_dir}/vsm_launch_test.py
 %{script_dir}/vsm_test_parser.py
-%config /etc/vasum/tests
-%attr(755,root,root) /etc/vasum/tests/templates
+%config /etc/vasum/tests/*.conf
+%config /etc/vasum/tests/dbus/*.conf
+%config /etc/vasum/tests/provision/*.conf
+%config /etc/vasum/tests/templates/*.conf
+%attr(755,root,root) /etc/vasum/tests/templates/*.sh
+%config /etc/vasum/tests/utils/*.txt
 %{python_sitelib}/vsm_integration_tests
 %config /etc/dbus-1/system.d/org.tizen.vasum.tests.conf
 %{_unitdir}/vasum-socket-test.socket
index 0800124..b94eb29 100644 (file)
@@ -6,7 +6,6 @@
     "zoneTemplateDir" : "/etc/vasum/templates/",
     "runMountPointPrefix" : "/var/run/zones",
     "defaultId" : "",
-    "zoneTemplatePrefix" : "/etc/vasum/templates",
     "availableVTs" : [3, 4, 5, 6],
     "inputConfig" : {"enabled" : true,
                      "device" : "gpio_keys.6",
index 473a11c..05d9c7d 100644 (file)
@@ -46,7 +46,7 @@ const std::uint64_t DEFAULT_VCPU_PERIOD_MS = 100000;
 
 ZoneAdmin::ZoneAdmin(const std::string& zoneId,
                      const std::string& zonesPath,
-                     const std::string& zoneTemplatePrefix,
+                     const std::string& zoneTemplateDir,
                      const ZoneConfig& config,
                      const ZoneDynamicConfig& dynamicConfig)
     : mConfig(config),
@@ -61,7 +61,7 @@ ZoneAdmin::ZoneAdmin(const std::string& zoneId,
     if (!mZone.isDefined()) {
 
         const std::string zoneTemplate = utils::getAbsolutePath(config.zoneTemplate,
-                                                               zoneTemplatePrefix);
+                                                                zoneTemplateDir);
         LOGI(mId << ": Creating zone from template: " << zoneTemplate);
         utils::CStringArrayBuilder args;
         if (!dynamicConfig.ipv4Gateway.empty()) {
index d154beb..ec4c7cd 100644 (file)
@@ -47,13 +47,13 @@ public:
      * ZoneAdmin constructor
      * @param zoneId zone id
      * @param zonesPath directory where zones are defined (configs, rootfs etc)
-     * @param zoneTemplatePrefix directory where templates are stored
+     * @param zoneTemplateDir directory where templates are stored
      * @param config zones config
      * @param dynamicConfig zones dynamic config
      */
     ZoneAdmin(const std::string& zoneId,
               const std::string& zonesPath,
-              const std::string& zoneTemplatePrefix,
+              const std::string& zoneTemplateDir,
               const ZoneConfig& config,
               const ZoneDynamicConfig& dynamicConfig);
     virtual ~ZoneAdmin();
index aad9159..01fc728 100644 (file)
@@ -38,7 +38,7 @@ namespace vasum {
 struct ZoneConfig {
 
     /**
-     * Zone template name (relative to zoneTemplatePrefix)
+     * Zone template name (relative to zoneTemplateDir)
      */
     std::string zoneTemplate;
 
index a19fc6a..3fe0b12 100644 (file)
@@ -56,7 +56,7 @@ Zone::Zone(const std::string& zoneId,
            const std::string& zonesPath,
            const std::string& zoneTemplatePath,
            const std::string& dbPath,
-           const std::string& zoneTemplatePrefix,
+           const std::string& zoneTemplateDir,
            const std::string& baseRunMountPointPath)
     : mDbPath(dbPath)
 {
@@ -75,7 +75,7 @@ Zone::Zone(const std::string& zoneId,
         mRunMountPoint = fs::absolute(mDynamicConfig.runMountPoint, baseRunMountPointPath).string();
     }
 
-    mAdmin.reset(new ZoneAdmin(zoneId, zonesPath, zoneTemplatePrefix, mConfig, mDynamicConfig));
+    mAdmin.reset(new ZoneAdmin(zoneId, zonesPath, zoneTemplateDir, mConfig, mDynamicConfig));
 
     const fs::path zonePath = fs::path(zonesPath) / zoneId;
     mRootPath = (zonePath / fs::path("rootfs")).string();
index ee1bf43..fb9f0c7 100644 (file)
@@ -49,14 +49,14 @@ public:
      * @param zonesPath directory where zones are defined (configs, rootfs etc)
      * @param zoneTemplatePath path for zones config template
      * @param dbPath path to dynamic config db file
-     * @param zoneTemplatePrefix directory where templates are stored
+     * @param zoneTemplateDir directory where templates are stored
      * @param baseRunMountPointPath base directory for run mount point
      */
     Zone(const std::string& zoneId,
          const std::string& zonesPath,
          const std::string& zoneTemplatePath,
          const std::string& dbPath,
-         const std::string& zoneTemplatePrefix,
+         const std::string& zoneTemplateDir,
          const std::string& baseRunMountPointPath);
     Zone(const Zone&) = delete;
     Zone& operator=(const Zone&) = delete;
index b59cfc2..6e4625f 100644 (file)
@@ -60,11 +60,6 @@ struct ZonesManagerConfig {
     std::string zoneTemplateDir;
 
     /**
-     * Path prefix for zone templates
-     */
-    std::string zoneTemplatePrefix;
-
-    /**
      * VTs available for zones
      */
     std::vector<int> availableVTs;
@@ -90,7 +85,6 @@ struct ZonesManagerConfig {
         zonesPath,
         zoneImagePath,
         zoneTemplateDir,
-        zoneTemplatePrefix,
         availableVTs,
         inputConfig,
         runMountPointPrefix,
index 3869a39..0762294 100644 (file)
@@ -323,7 +323,7 @@ void ZonesManager::insertZone(const std::string& zoneId, const std::string& zone
                                         mConfig.zonesPath,
                                         zoneTemplatePath,
                                         mConfig.dbPath,
-                                        mConfig.zoneTemplatePrefix,
+                                        mConfig.zoneTemplateDir,
                                         mConfig.runMountPointPrefix));
 
     mZones.push_back(std::move(zone));
index a4e6cfd..452a54a 100644 (file)
@@ -76,13 +76,7 @@ SET(VSM_TEST_TEMPLATES_INSTALL_DIR ${VSM_CONFIG_INSTALL_DIR}/tests/templates)
 ADD_DEFINITIONS(-DVSM_TEST_CONFIG_INSTALL_DIR="${VSM_TEST_CONFIG_INSTALL_DIR}")
 ADD_DEFINITIONS(-DVSM_TEST_TEMPLATES_INSTALL_DIR="${VSM_TEST_TEMPLATES_INSTALL_DIR}")
 
-ADD_SUBDIRECTORY(dbus/configs)
-ADD_SUBDIRECTORY(server/configs)
-ADD_SUBDIRECTORY(utils/configs)
-ADD_SUBDIRECTORY(client/configs)
-ADD_SUBDIRECTORY(lxc/templates)
-ADD_SUBDIRECTORY(socket_test_service/configs)
-
+ADD_SUBDIRECTORY(configs)
 
 ## Install #####################################################################
 INSTALL(TARGETS ${UT_SERVER_CODENAME} DESTINATION bin)
diff --git a/tests/unit_tests/client/configs/CMakeLists.txt b/tests/unit_tests/client/configs/CMakeLists.txt
deleted file mode 100644 (file)
index 64618ed..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-#
-# @file   CMakeLists.txt
-# @author Mateusz Malicki (m.malicki2@samsung.com)
-#
-
-MESSAGE(STATUS "Installing configs for the Client Unit Tests to " ${VSM_TEST_CONFIG_INSTALL_DIR})
-
-## Generate ####################################################################
-CONFIGURE_FILE(ut-client/test-daemon.conf.in
-              ${CMAKE_BINARY_DIR}/ut-client/test-daemon.conf @ONLY)
-FILE(GLOB client_manager_CONF_GEN ${CMAKE_BINARY_DIR}/ut-client/*.conf)
-
-CONFIGURE_FILE(ut-client/templates/console-dbus.conf.in
-               ${CMAKE_BINARY_DIR}/ut-client/templates/console-dbus.conf @ONLY)
-CONFIGURE_FILE(ut-client/templates/console-ipc.conf.in
-               ${CMAKE_BINARY_DIR}/ut-client/templates/console-ipc.conf @ONLY)
-FILE(GLOB client_templates_CONF_GEN ${CMAKE_BINARY_DIR}/ut-client/templates/*.conf)
-
-## Install #####################################################################
-INSTALL(FILES        ${client_manager_CONF_GEN}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/client/ut-client)
-INSTALL(FILES        ${client_templates_CONF_GEN}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/client/ut-client/templates)
index a43319c..328a5bd 100644 (file)
@@ -51,7 +51,7 @@ using namespace utils;
 namespace {
 
 const std::string TEST_CONFIG_PATH =
-    VSM_TEST_CONFIG_INSTALL_DIR "/client/ut-client/test-daemon.conf";
+    VSM_TEST_CONFIG_INSTALL_DIR "/test-daemon.conf";
 const std::string ZONES_PATH = "/tmp/ut-zones"; // the same as in daemon.conf
 const std::string TEMPLATE_NAME = "console-ipc";
 
diff --git a/tests/unit_tests/configs/CMakeLists.txt b/tests/unit_tests/configs/CMakeLists.txt
new file mode 100644 (file)
index 0000000..04aabda
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+#
+# @file   CMakeLists.txt
+# @author Dariusz Michaluk (d.michaluk@samsung.com)
+#
+
+MESSAGE(STATUS "Installing configs for the Unit Tests to " ${VSM_TEST_CONFIG_INSTALL_DIR})
+
+FILE(GLOB ut_zone_CONF            *.conf)
+FILE(GLOB ut_zone_templates_CONF  templates/*.conf
+                                  templates/*.sh)
+
+## Generate ####################################################################
+CONFIGURE_FILE(test-daemon.conf.in
+              ${CMAKE_BINARY_DIR}/test-daemon.conf @ONLY)
+FILE(GLOB ut_zone_CONF_GEN ${CMAKE_BINARY_DIR}/*.conf)
+
+CONFIGURE_FILE(templates/console-dbus.conf.in
+               ${CMAKE_BINARY_DIR}/templates/console-dbus.conf @ONLY)
+CONFIGURE_FILE(templates/console-ipc.conf.in
+               ${CMAKE_BINARY_DIR}/templates/console-ipc.conf @ONLY)
+FILE(GLOB ut_zone_templates_CONF_GEN ${CMAKE_BINARY_DIR}/templates/*.conf)
+
+
+## Install #####################################################################
+INSTALL(FILES        ${ut_zone_CONF}
+                     ${ut_zone_CONF_GEN}
+        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR})
+
+INSTALL(FILES        ${ut_zone_templates_CONF}
+                     ${ut_zone_templates_CONF_GEN}
+        DESTINATION  ${VSM_TEST_TEMPLATES_INSTALL_DIR})
+
+INSTALL(FILES        dbus/ut-dbus.conf
+                     dbus/ut-dbus-system.conf
+        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/dbus)
+
+INSTALL(FILES        provision/test-provision.conf
+        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/provision)
+
+INSTALL(FILES        utils/file.txt
+        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/utils)
+
+INSTALL(FILES        systemd/vasum-socket-test.socket
+                     systemd/vasum-socket-test.service
+        DESTINATION  ${SYSTEMD_UNIT_DIR})
+
+INSTALL(FILES        dbus-1/system.d/org.tizen.vasum.tests.conf
+        DESTINATION  ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/)
+
@@ -1,6 +1,6 @@
 {
-    "zoneTemplate" : "minimal-dbus.sh",
-    "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; /usr/bin/dbus-daemon --config-file=@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-zones-manager/ut-dbus.conf --fork; read"],
+    "zoneTemplate" : "minimal.sh",
+    "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; /usr/bin/dbus-daemon --config-file=@VSM_TEST_CONFIG_INSTALL_DIR@/dbus/ut-dbus-system.conf --fork; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
     "ipv4" : "",
@@ -1,5 +1,5 @@
 {
-    "zoneTemplate" : "minimal-dbus.sh",
+    "zoneTemplate" : "minimal.sh",
     "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
     "requestedState" : "running",
     "ipv4Gateway" : "",
@@ -4,7 +4,7 @@
     "requestedState" : "running",
     "ipv4Gateway" : "",
     "ipv4" : "",
-    "privilege" : 10,
+    "privilege" : 20,
     "vt" : -1,
     "switchToDefaultAfterTimeout" : true,
     "cpuQuotaForeground" : -1,
similarity index 96%
rename from tests/unit_tests/lxc/templates/minimal-dbus.sh
rename to tests/unit_tests/configs/templates/minimal.sh
index a33ccac..948cf01 100755 (executable)
@@ -48,8 +48,8 @@ lxc.utsname = ${name}
 lxc.rootfs = ${rootfs}
 
 # userns 1-to-1 mapping
-lxc.id_map = u 0 0 65536
-lxc.id_map = g 0 0 65536
+#lxc.id_map = u 0 0 65536
+#lxc.id_map = g 0 0 65536
 
 lxc.haltsignal = SIGTERM
 
@@ -1,15 +1,14 @@
 {
     "dbPath" : "/tmp/ut-zones/vasum.db",
     "zoneIds" : [],
-    "defaultId" : "",
     "zonesPath" : "/tmp/ut-zones",
     "zoneImagePath" : "",
-    "zoneTemplateDir" : "@VSM_TEST_CONFIG_INSTALL_DIR@/client/ut-client/templates/",
+    "zoneTemplateDir" : "@VSM_TEST_CONFIG_INSTALL_DIR@/templates/",
     "runMountPointPrefix" : "",
-    "zoneTemplatePrefix" : "@VSM_TEST_TEMPLATES_INSTALL_DIR@",
+    "defaultId" : "",
     "availableVTs" : [],
     "inputConfig" : {"enabled" : false,
-                     "device" : "/dev/doesnotexist",
+                     "device" : "gpio-keys.4",
                      "code" : 139,
                      "numberOfEvents" : 2,
                      "timeWindowMs" : 500},
diff --git a/tests/unit_tests/dbus/configs/CMakeLists.txt b/tests/unit_tests/dbus/configs/CMakeLists.txt
deleted file mode 100644 (file)
index 69c2910..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-#
-# @file   CMakeLists.txt
-# @author Lukasz Pawelczyk (l.pawelczyk@partner.samsung.com)
-#
-
-MESSAGE(STATUS "Installing configs for the DBus Unit Tests to " ${VSM_TEST_CONFIG_INSTALL_DIR})
-FILE(GLOB dbus_CONF                 ut-connection/*.conf)
-
-
-## Install #####################################################################
-INSTALL(FILES        ${dbus_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/dbus/ut-connection)
index b427355..98154df 100644 (file)
@@ -55,7 +55,7 @@ namespace {
 const char* DBUS_DAEMON_PROC = "/usr/bin/dbus-daemon";
 const char* const DBUS_DAEMON_ARGS[] = {
     DBUS_DAEMON_PROC,
-    "--config-file=" VSM_TEST_CONFIG_INSTALL_DIR "/dbus/ut-connection/ut-dbus.conf",
+    "--config-file=" VSM_TEST_CONFIG_INSTALL_DIR "/dbus/ut-dbus.conf",
     "--nofork",
     NULL
 };
diff --git a/tests/unit_tests/lxc/templates/CMakeLists.txt b/tests/unit_tests/lxc/templates/CMakeLists.txt
deleted file mode 100644 (file)
index c7b98c5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-#
-# @file
-# @author Piotr Bartosiewicz (p.bartosiewi@partner.samsung.com)
-#
-
-FILE(GLOB ZONE_TEMPLATES *.sh)
-
-INSTALL(PROGRAMS     ${ZONE_TEMPLATES}
-        DESTINATION  ${VSM_TEST_TEMPLATES_INSTALL_DIR})
diff --git a/tests/unit_tests/lxc/templates/minimal.sh b/tests/unit_tests/lxc/templates/minimal.sh
deleted file mode 100755 (executable)
index 0450d1a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-
-echo UnitTest LXC template, args: $@
-
-options=$(getopt -o p:n: -l rootfs:,path:,name: -- "$@")
-if [ $? -ne 0 ]; then
-    exit 1
-fi
-eval set -- "$options"
-
-while true
-do
-    case "$1" in
-        -p|--path)      path=$2; shift 2;;
-        --rootfs)       rootfs=$2; shift 2;;
-        -n|--name)      name=$2; shift 2;;
-        --)             shift 1; break ;;
-        *)              break ;;
-    esac
-done
-
-# Prepare zone rootfs
-ROOTFS_DIRS="\
-${rootfs}/bin \
-${rootfs}/dev \
-${rootfs}/dev/pts \
-${rootfs}/etc \
-${rootfs}/home \
-${rootfs}/lib \
-${rootfs}/lib64 \
-${rootfs}/proc \
-${rootfs}/root \
-${rootfs}/run \
-${rootfs}/sbin \
-${rootfs}/sys \
-${rootfs}/tmp \
-${rootfs}/usr \
-${rootfs}/opt
-"
-/bin/mkdir ${ROOTFS_DIRS}
-
-# Prepare zone configuration file
-> ${path}/config
-cat <<EOF >> ${path}/config
-lxc.utsname = ${name}
-lxc.rootfs = ${rootfs}
-
-# userns 1-to-1 mapping
-lxc.id_map = u 0 0 65536
-lxc.id_map = g 0 0 65536
-
-lxc.haltsignal = SIGTERM
-
-lxc.pts = 256
-lxc.tty = 0
-
-#lxc.loglevel = TRACE
-#lxc.logfile = /tmp/${name}.log
-
-lxc.cgroup.devices.deny = a
-
-lxc.mount.auto = proc sys cgroup
-lxc.mount.entry = /bin bin none ro,bind 0 0
-lxc.mount.entry = /etc etc none ro,bind 0 0
-lxc.mount.entry = /lib lib none ro,bind 0 0
-lxc.mount.entry = /sbin sbin none ro,bind 0 0
-lxc.mount.entry = /usr usr none ro,rbind 0 0
-lxc.mount.entry = /opt opt none ro,rbind 0 0
-EOF
-
-if [ "$(uname -m)" = "x86_64" ]; then
-cat <<EOF >> $path/config
-lxc.mount.entry = /lib64 lib64 none ro,bind 0 0
-EOF
-fi
-
diff --git a/tests/unit_tests/server/configs/CMakeLists.txt b/tests/unit_tests/server/configs/CMakeLists.txt
deleted file mode 100644 (file)
index a91d5d8..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-#
-# @file   CMakeLists.txt
-# @author Jan Olszak (j.olszak@samsung.com)
-#
-
-MESSAGE(STATUS "Installing configs for the Server Unit Tests to " ${VSM_TEST_CONFIG_INSTALL_DIR})
-
-FILE(GLOB server_manager_CONF       ut-server/*.conf)
-FILE(GLOB server_templates_CONF     ut-server/templates/*.conf)
-
-FILE(GLOB manager_manager_CONF      ut-zones-manager/*.conf)
-FILE(GLOB manager_templates_CONF    ut-zones-manager/templates/*.conf)
-
-FILE(GLOB zone_CONF            ut-zone/*.conf)
-FILE(GLOB zone_templates_CONF  ut-zone/templates/*.conf)
-
-FILE(GLOB zone_provision_CONF  ut-zone-provision/*.conf)
-
-FILE(GLOB admin_templates_CONF      ut-zone-admin/templates/*.conf)
-
-
-## Generate ####################################################################
-CONFIGURE_FILE(ut-server/test-daemon.conf.in
-              ${CMAKE_BINARY_DIR}/ut-server/test-daemon.conf @ONLY)
-FILE(GLOB server_manager_CONF_GEN ${CMAKE_BINARY_DIR}/ut-server/*.conf)
-
-CONFIGURE_FILE(ut-zone/templates/test-dbus.conf.in
-               ${CMAKE_BINARY_DIR}/ut-zone/templates/test-dbus.conf @ONLY)
-FILE(GLOB zone_templates_CONF_GEN ${CMAKE_BINARY_DIR}/ut-zone/templates/*.conf)
-
-CONFIGURE_FILE(ut-zones-manager/test-daemon.conf.in
-               ${CMAKE_BINARY_DIR}/ut-zones-manager/test-daemon.conf @ONLY)
-FILE(GLOB manager_manager_CONF_GEN ${CMAKE_BINARY_DIR}/ut-zones-manager/*.conf)
-
-FILE(GLOB manager_templates_CONF_GEN ${CMAKE_BINARY_DIR}/ut-zones-manager/templates/*.conf)
-
-
-## Install #####################################################################
-INSTALL(FILES        ${server_manager_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-server)
-INSTALL(FILES        ${server_manager_CONF_GEN}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-server)
-INSTALL(FILES        ${server_templates_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-server/templates)
-
-INSTALL(FILES        ${manager_manager_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zones-manager)
-INSTALL(FILES        ${manager_manager_CONF_GEN}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zones-manager)
-INSTALL(FILES        ${manager_templates_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zones-manager/templates)
-INSTALL(FILES        ${manager_templates_CONF_GEN}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zones-manager/templates)
-
-INSTALL(FILES        ${zone_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zone)
-INSTALL(FILES        ${zone_templates_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zone/templates)
-INSTALL(FILES        ${zone_templates_CONF_GEN}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zone/templates)
-
-INSTALL(FILES        ${zone_provision_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zone-provision)
-
-INSTALL(FILES        ${admin_templates_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/server/ut-zone-admin/templates)
-
-INSTALL(FILES        dbus-1/system.d/org.tizen.vasum.tests.conf
-        DESTINATION  ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/)
diff --git a/tests/unit_tests/server/configs/ut-server/templates/default.conf b/tests/unit_tests/server/configs/ut-server/templates/default.conf
deleted file mode 100644 (file)
index 646fcb1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "zoneTemplate" : "minimal.sh",
-    "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
-    "requestedState" : "running",
-    "ipv4Gateway" : "",
-    "ipv4" : "",
-    "privilege" : 20,
-    "vt" : -1,
-    "switchToDefaultAfterTimeout" : true,
-    "cpuQuotaForeground" : -1,
-    "cpuQuotaBackground" : 1000,
-    "shutdownTimeout" : 10,
-    "runMountPoint" : "",
-    "provisions" : [],
-    "permittedToSend" : [],
-    "permittedToRecv" : [],
-    "validLinkPrefixes" : []
-}
diff --git a/tests/unit_tests/server/configs/ut-server/test-daemon.conf.in b/tests/unit_tests/server/configs/ut-server/test-daemon.conf.in
deleted file mode 100644 (file)
index 1d59bdc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "dbPath" : "/tmp/ut-zones/vasum.db",
-    "zoneIds" : [],
-    "zonesPath" : "/tmp/ut-zones",
-    "zoneImagePath" : "",
-    "zoneTemplateDir" : "@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-server/templates/",
-    "runMountPointPrefix" : "",
-    "defaultId" : "",
-    "zoneTemplatePrefix" : "@VSM_TEST_TEMPLATES_INSTALL_DIR@",
-    "availableVTs" : [],
-    "inputConfig" : {"enabled" : false,
-                     "device" : "gpio-keys.4",
-                     "code" : 139,
-                     "numberOfEvents" : 2,
-                     "timeWindowMs" : 500},
-    "proxyCallRules" : []
-}
diff --git a/tests/unit_tests/server/configs/ut-zone-admin/templates/test.conf b/tests/unit_tests/server/configs/ut-zone-admin/templates/test.conf
deleted file mode 100644 (file)
index fea418d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "zoneTemplate" : "minimal.sh",
-    "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
-    "requestedState" : "running",
-    "ipv4Gateway" : "",
-    "ipv4" : "",
-    "privilege" : 10,
-    "vt" : -1,
-    "switchToDefaultAfterTimeout" : true,
-    "cpuQuotaForeground" : -1,
-    "cpuQuotaBackground" : 1000,
-    "shutdownTimeout" : 10,
-    "runMountPoint" : "",
-    "provisions" : [],
-    "permittedToSend" : [],
-    "permittedToRecv" : [],
-    "validLinkPrefixes" : []
-}
diff --git a/tests/unit_tests/server/configs/ut-zone/templates/test-dbus.conf.in b/tests/unit_tests/server/configs/ut-zone/templates/test-dbus.conf.in
deleted file mode 100644 (file)
index 0dd101a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "zoneTemplate" : "minimal-dbus.sh",
-    "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; /usr/bin/dbus-daemon --config-file=@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-zone/ut-dbus.conf --fork; read"],
-    "requestedState" : "running",
-    "ipv4Gateway" : "",
-    "ipv4" : "",
-    "privilege" : 10,
-    "vt" : -1,
-    "switchToDefaultAfterTimeout" : true,
-    "cpuQuotaForeground" : -1,
-    "cpuQuotaBackground" : 1000,
-    "shutdownTimeout" : 10,
-    "runMountPoint" : "/tmp/ut-run/zoneId",
-    "provisions" : [],
-    "permittedToSend" : [],
-    "permittedToRecv" : [],
-    "validLinkPrefixes" : []
-}
diff --git a/tests/unit_tests/server/configs/ut-zone/ut-dbus.conf b/tests/unit_tests/server/configs/ut-zone/ut-dbus.conf
deleted file mode 100644 (file)
index 2e0488d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This configuration file controls the zones message bus -->
-
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-
-<busconfig>
-    <type>custom</type>
-    <listen>unix:path=/var/run/dbus/system_bus_socket</listen>
-
-    <policy context="default">
-        <!-- Allow everything to be sent -->
-        <allow send_destination="*" eavesdrop="true"/>
-        <!-- Allow everything to be received -->
-        <allow eavesdrop="true"/>
-        <!-- Allow anyone to own anything -->
-        <allow own="*"/>
-    </policy>
-</busconfig>
diff --git a/tests/unit_tests/server/configs/ut-zones-manager/templates/console.conf b/tests/unit_tests/server/configs/ut-zones-manager/templates/console.conf
deleted file mode 100644 (file)
index 2537e16..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "zoneTemplate" : "minimal.sh",
-    "initWithArgs" : ["/bin/sh", "-c", "trap exit SIGTERM; read"],
-    "requestedState" : "running",
-    "ipv4Gateway" : "",
-    "ipv4" : "",
-    "privilege" : 20,
-    "vt" : -1,
-    "switchToDefaultAfterTimeout" : true,
-    "cpuQuotaForeground" : -1,
-    "cpuQuotaBackground" : 1000,
-    "shutdownTimeout" : 10,
-    "runMountPoint" : "",
-    "provisions" : [],
-    "permittedToSend" : [ "/tmp/.*" ],
-    "permittedToRecv" : [ "/tmp/.*" ],
-    "validLinkPrefixes" : []
-}
diff --git a/tests/unit_tests/server/configs/ut-zones-manager/test-daemon.conf.in b/tests/unit_tests/server/configs/ut-zones-manager/test-daemon.conf.in
deleted file mode 100644 (file)
index a388e6d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "dbPath" : "/tmp/ut-zones/vasum.db",
-    "zoneIds" : [],
-    "defaultId" : "",
-    "zonesPath" : "/tmp/ut-zones",
-    "zoneImagePath" : "",
-    "zoneTemplateDir" : "@VSM_TEST_CONFIG_INSTALL_DIR@/server/ut-zones-manager/templates/",
-    "runMountPointPrefix" : "",
-    "zoneTemplatePrefix" : "@VSM_TEST_TEMPLATES_INSTALL_DIR@",
-    "availableVTs" : [],
-    "inputConfig" : {"enabled" : false,
-                     "device" : "/dev/doesnotexist",
-                     "code" : 139,
-                     "numberOfEvents" : 2,
-                     "timeWindowMs" : 500},
-    "proxyCallRules" : [{"caller" : "*",
-                         "target" : "*",
-                         "targetBusName" : "org.tizen.vasum.tests",
-                         "targetObjectPath" : "*",
-                         "targetInterface" : "*",
-                         "targetMethod" : "*"}]
-}
index 600b271..af6d5ca 100644 (file)
@@ -44,7 +44,7 @@ using namespace config;
 
 namespace {
 
-const std::string CONFIG_DIR = VSM_TEST_CONFIG_INSTALL_DIR "/server/ut-server";
+const std::string CONFIG_DIR = VSM_TEST_CONFIG_INSTALL_DIR;
 const std::string TEST_CONFIG_PATH = CONFIG_DIR + "/test-daemon.conf";
 const std::string MISSING_CONFIG_PATH = CONFIG_DIR + "/missing-daemon.conf";
 const std::string TEMPLATE_NAME = "default";
index 72bc2e6..faee59a 100644 (file)
@@ -37,13 +37,12 @@ using namespace vasum;
 
 namespace {
 
-const std::string TEMPLATES_DIR = VSM_TEST_CONFIG_INSTALL_DIR "/server/ut-zone-admin/templates";
-const std::string TEST_CONFIG_PATH = TEMPLATES_DIR + "/test.conf";
+const std::string TEMPLATES_DIR = VSM_TEST_TEMPLATES_INSTALL_DIR;
+const std::string TEST_CONFIG_PATH = TEMPLATES_DIR + "/default.conf";
 const std::string TEST_NO_SHUTDOWN_CONFIG_PATH = TEMPLATES_DIR + "/test-no-shutdown.conf";
-const std::string BUGGY_CONFIG_PATH = TEMPLATES_DIR + "/buggy.conf";
+const std::string BUGGY_CONFIG_PATH = TEMPLATES_DIR + "/buggy-init.conf";
 const std::string MISSING_CONFIG_PATH = TEMPLATES_DIR + "/missing.conf";
 const std::string ZONES_PATH = "/tmp/ut-zones";
-const std::string TEMPLATES_PATH = VSM_TEST_TEMPLATES_INSTALL_DIR;
 
 struct Fixture {
     utils::ScopedGlibLoop mLoop;
@@ -62,7 +61,7 @@ struct Fixture {
         config::loadFromJsonFile(configPath, mDynamicConfig);
         return std::unique_ptr<ZoneAdmin>(new ZoneAdmin("zoneId",
                                                         ZONES_PATH,
-                                                        TEMPLATES_PATH,
+                                                        TEMPLATES_DIR,
                                                         mConfig,
                                                         mDynamicConfig));
     }
index 65a5b91..45a74d7 100644 (file)
@@ -49,10 +49,9 @@ namespace fs = boost::filesystem;
 
 namespace {
 
-const std::string TEST_CONFIG_PATH = VSM_TEST_CONFIG_INSTALL_DIR "/server/ut-zone-provision/test.conf";
+const std::string TEST_CONFIG_PATH = VSM_TEST_CONFIG_INSTALL_DIR "/provision/test-provision.conf";
 const std::string ZONE = "ut-zone-provision-test";
 const fs::path ZONES_PATH = "/tmp/ut-zones";
-const fs::path TEMPLATES_PATH = VSM_TEST_TEMPLATES_INSTALL_DIR;
 const fs::path ZONE_PATH = ZONES_PATH / fs::path(ZONE);
 const fs::path SOME_FILE_PATH = ZONE_PATH / "file.txt";
 const fs::path ROOTFS_PATH = ZONE_PATH / "rootfs";
index 755aa52..abc10dc 100644 (file)
@@ -52,13 +52,12 @@ using namespace config;
 
 namespace {
 
-const std::string TEMPLATES_DIR = VSM_TEST_CONFIG_INSTALL_DIR "/server/ut-zone/templates";
-const std::string TEST_CONFIG_PATH = TEMPLATES_DIR + "/test.conf";
-const std::string TEST_DBUS_CONFIG_PATH = TEMPLATES_DIR + "/test-dbus.conf";
-const std::string BUGGY_CONFIG_PATH = TEMPLATES_DIR + "/buggy.conf";
-const std::string MISSING_CONFIG_PATH = TEMPLATES_DIR + "/missing.conf";
+const std::string TEMPLATES_DIR = VSM_TEST_TEMPLATES_INSTALL_DIR;
+const std::string TEST_CONFIG_PATH = TEMPLATES_DIR + "/default.conf";
+const std::string TEST_DBUS_CONFIG_PATH = TEMPLATES_DIR + "/console-dbus.conf";
+const std::string BUGGY_CONFIG_PATH = TEMPLATES_DIR + "/buggy-template.conf";
+const std::string MISSING_CONFIG_PATH = TEMPLATES_DIR + "/missing-config.conf";
 const std::string ZONES_PATH = "/tmp/ut-zones";
-const std::string TEMPLATES_PATH = VSM_TEST_TEMPLATES_INSTALL_DIR;
 const std::string DB_PATH = ZONES_PATH + "/vasum.db";
 const std::string BRIDGE_NAME = "brtest01";
 const std::string ZONE_NETDEV = "netdevtest01";
@@ -89,7 +88,7 @@ struct Fixture {
                                               ZONES_PATH,
                                               configPath,
                                               DB_PATH,
-                                              TEMPLATES_PATH,
+                                              TEMPLATES_DIR,
                                               ""));
     }
 
index f7a4351..f73e164 100644 (file)
@@ -69,7 +69,7 @@ using namespace dbus;
 
 namespace {
 
-const std::string CONFIG_DIR = VSM_TEST_CONFIG_INSTALL_DIR "/server/ut-zones-manager";
+const std::string CONFIG_DIR = VSM_TEST_CONFIG_INSTALL_DIR;
 const std::string TEST_CONFIG_PATH = CONFIG_DIR + "/test-daemon.conf";
 const std::string MISSING_CONFIG_PATH = CONFIG_DIR + "/missing-daemon.conf";
 const int EVENT_TIMEOUT = 5000;
@@ -81,7 +81,7 @@ const std::string FILE_CONTENT = "File content\n"
                                  "Line 2\n";
 const std::string NON_EXISTANT_ZONE_ID = "NON_EXISTANT_ZONE_ID";
 const std::string ZONES_PATH = "/tmp/ut-zones"; // the same as in daemon.conf
-const std::string SIMPLE_TEMPLATE = "console";
+const std::string SIMPLE_TEMPLATE = "console-ipc";
 
 #ifdef DBUS_CONNECTION
 /**
diff --git a/tests/unit_tests/socket_test_service/configs/CMakeLists.txt b/tests/unit_tests/socket_test_service/configs/CMakeLists.txt
deleted file mode 100644 (file)
index 17e79b9..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-#
-# @file   CMakeLists.txt
-# @author Lukasz Kostyra (l.kostyra@samsung.com)
-#
-
-MESSAGE(STATUS "Installing configs for Vasum sycket test service to " ${VSM_TEST_CONFIG_INSTALL_DIR})
-
-## Install #####################################################################
-INSTALL(FILES        systemd/vasum-socket-test.socket
-        DESTINATION  ${SYSTEMD_UNIT_DIR})
-INSTALL(FILES        systemd/vasum-socket-test.service
-        DESTINATION  ${SYSTEMD_UNIT_DIR})
diff --git a/tests/unit_tests/utils/configs/CMakeLists.txt b/tests/unit_tests/utils/configs/CMakeLists.txt
deleted file mode 100644 (file)
index d408df0..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-#
-# @file   CMakeLists.txt
-# @author Lukasz Pawelczyk (l.pawelczyk@partner.samsung.com)
-#
-
-MESSAGE(STATUS "Installing configs for the Utils Unit Tests to " ${VSM_TEST_CONFIG_INSTALL_DIR})
-FILE(GLOB fs_CONF ut-fs/*.txt)
-
-
-## Install #####################################################################
-INSTALL(FILES        ${fs_CONF}
-        DESTINATION  ${VSM_TEST_CONFIG_INSTALL_DIR}/utils/ut-fs)
index 2cc32d0..5881193 100644 (file)
@@ -39,7 +39,7 @@ using namespace utils;
 namespace {
 
 const std::string TEST_PATH = "/tmp/ut-fsutils";
-const std::string REFERENCE_FILE_PATH = VSM_TEST_CONFIG_INSTALL_DIR "/utils/ut-fs/file.txt";
+const std::string REFERENCE_FILE_PATH = VSM_TEST_CONFIG_INSTALL_DIR "/utils/file.txt";
 const std::string REFERENCE_FILE_CONTENT = "File content\n"
                                            "Line 1\n"
                                            "Line 2\n";