From cfb2b9cc3d914d1e18bbee8bea04f46e26809c34 Mon Sep 17 00:00:00 2001 From: Radoslaw Wicik Date: Tue, 4 May 2021 12:07:37 +0200 Subject: [PATCH] [EGD-6645] Fix ContactGroups tests Fixed Contact Groups tests. --- module-db/tests/ContactGroups_tests.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module-db/tests/ContactGroups_tests.cpp b/module-db/tests/ContactGroups_tests.cpp index 083aadf1ad3ffecc92811915b327796a574bec88..fef3518682a3c89fad4dbb3fc121da03767b2522 100644 --- a/module-db/tests/ContactGroups_tests.cpp +++ b/module-db/tests/ContactGroups_tests.cpp @@ -1,6 +1,7 @@ // Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md +#include "common.hpp" #include #include @@ -27,9 +28,7 @@ TEST_CASE("Contact Groups tests") INFO("sqlite Init"); Database::initialize(); const auto contactsPath = (std::filesystem::path{"sys/user"} / "contacts.db"); - if (std::filesystem::exists(contactsPath)) { - REQUIRE(std::filesystem::remove(contactsPath)); - } + RemoveDbFiles(contactsPath.stem()); ContactsDB contactDb{contactsPath.c_str()}; INFO("contactDB init");