X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tst%2Fasyncstorageimpl_test.cpp;h=d1b364934f69943ae671d520e4d0e4e4bcfc9553;hb=1c4a605ad92c57118ecb6722bace5501c8918af0;hp=a43c99738d10cbb61ffa52d37418e5026c127001;hpb=8324d029ce006509ddbc605446d05987c17e0368;p=ric-plt%2Fsdl.git diff --git a/tst/asyncstorageimpl_test.cpp b/tst/asyncstorageimpl_test.cpp index a43c997..d1b3649 100644 --- a/tst/asyncstorageimpl_test.cpp +++ b/tst/asyncstorageimpl_test.cpp @@ -14,6 +14,11 @@ limitations under the License. */ +/* + * This source code is part of the near-RT RIC (RAN Intelligent Controller) + * platform project (RICP). +*/ + #include #include #include "config.h" @@ -66,12 +71,16 @@ namespace this, std::placeholders::_1, std::placeholders::_2, - std::placeholders::_3))); + std::placeholders::_3, + std::placeholders::_4, + std::placeholders::_5))); } std::shared_ptr asyncDatabaseDiscoveryCreator(std::shared_ptr, - const DatabaseConfiguration&, - std::shared_ptr) + const std::string&, + const DatabaseConfiguration&, + const boost::optional&, + std::shared_ptr) { return discoveryMock; } @@ -135,3 +144,11 @@ TEST_F(AsyncStorageImplTest, CorrectHandlerIsUsedBasedOnConfiguration) AsyncStorage& returnedHandler2 = asyncStorageImpl->getOperationHandler(ns); EXPECT_EQ(typeid(AsyncDummyStorage&), typeid(returnedHandler2)); } + +TEST_F(AsyncStorageImplTest, CorrectSdlClusterHandlerIsUsedBasedOnConfiguration) +{ + expectNamespaceConfigurationIsDbBackendUseEnabled_returnTrue(); + dummyDatabaseConfiguration->checkAndApplyDbType("sdl-sentinel-cluster"); + AsyncStorage& returnedHandler = asyncStorageImpl->getOperationHandler(ns); + EXPECT_EQ(typeid(AsyncRedisStorage&), typeid(returnedHandler)); +}