Remove the memory database for the cache
[platform/core/appfw/pkgmgr-info.git] / test / unit_tests / test_parser_db_handlers.cc
index 30545bd..9310113 100644 (file)
@@ -35,6 +35,7 @@
 #include "server/pkgmgrinfo_internal.h"
 
 #define TEST_PARSER_DB "test.pkgmgr_parser.db"
+#define DB_VERSION_FILE "./pkg_db_version.txt"
 
 namespace psd = pkgmgr_server::database;
 namespace pc = pkgmgr_common;
@@ -119,12 +120,12 @@ class ParserDBHandlerTest : public TestFixture {
     std::string journal_path(TEST_PARSER_DB);
     journal_path += "-journal";
     ASSERT_EQ(remove(journal_path.c_str()), 0);
+    ASSERT_EQ(remove(DB_VERSION_FILE), 0);
   }
 
  private:
   void MakeVersionFile() {
-    std::remove("./pkg_db_version.txt");
-    std::ofstream ofs("./pkg_db_version.txt");
+    std::ofstream ofs(DB_VERSION_FILE);
     ofs << "30005";
   }