From a6b0dc4ad6784e93e3cf18171298dc1f4d6c8f62 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Tue, 8 Feb 2022 15:32:16 +0530 Subject: [PATCH] rgw/dbstore: Add dbstore-tests to `make check` Include and run dbstore-tests as part of `make check` target Signed-off-by: Soumya Koduri --- src/rgw/store/dbstore/tests/CMakeLists.txt | 5 +++-- src/rgw/store/dbstore/tests/dbstore_tests.cc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rgw/store/dbstore/tests/CMakeLists.txt b/src/rgw/store/dbstore/tests/CMakeLists.txt index e7a2a1e48db9..5ae2fba67b79 100644 --- a/src/rgw/store/dbstore/tests/CMakeLists.txt +++ b/src/rgw/store/dbstore/tests/CMakeLists.txt @@ -8,5 +8,6 @@ set(dbstore_tests_srcs include_directories(${CMAKE_INCLUDE_DIR}) -add_executable(dbstore-tests ${dbstore_tests_srcs}) -target_link_libraries(dbstore-tests ${CMAKE_LINK_LIBRARIES}) +add_executable(unittest_dbstore_tests ${dbstore_tests_srcs}) +target_link_libraries(unittest_dbstore_tests ${CMAKE_LINK_LIBRARIES}) +add_ceph_unittest(unittest_dbstore_tests) diff --git a/src/rgw/store/dbstore/tests/dbstore_tests.cc b/src/rgw/store/dbstore/tests/dbstore_tests.cc index 4591abdc5d77..34bded47edbf 100644 --- a/src/rgw/store/dbstore/tests/dbstore_tests.cc +++ b/src/rgw/store/dbstore/tests/dbstore_tests.cc @@ -29,7 +29,8 @@ namespace gtest { void SetUp() override { cct = global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, - CODE_ENVIRONMENT_DAEMON, CINIT_FLAG_NO_MON_CONFIG, 1)->get(); + CODE_ENVIRONMENT_DAEMON, + CINIT_FLAG_NO_DEFAULT_CONFIG_FILE | CINIT_FLAG_NO_MON_CONFIG | CINIT_FLAG_NO_DAEMON_ACTIONS)->get(); if (!db_type.compare("SQLite")) { db = new SQLiteDB(tenant, cct); ASSERT_TRUE(db != nullptr); -- 2.47.3