X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tst%2Fasyncstorageimpl_test.cpp;h=8fd2147146509d23504ded8e9acf4f45881265b7;hb=refs%2Fchanges%2F28%2F6128%2F4;hp=84955f5e211b38a1ed220c048fef4c7d8da29138;hpb=a0745d294dcd72f7d78ea4c3accd3b477dd668a5;p=ric-plt%2Fsdl.git diff --git a/tst/asyncstorageimpl_test.cpp b/tst/asyncstorageimpl_test.cpp index 84955f5..8fd2147 100644 --- a/tst/asyncstorageimpl_test.cpp +++ b/tst/asyncstorageimpl_test.cpp @@ -71,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; } @@ -140,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-cluster"); + AsyncStorage& returnedHandler = asyncStorageImpl->getOperationHandler(ns); + EXPECT_EQ(typeid(AsyncRedisStorage&), typeid(returnedHandler)); +}