X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tst%2Fsyncstorageimpl_test.cpp;fp=tst%2Fsyncstorageimpl_test.cpp;h=3dd9dd45f49f52782bd34027512e02cbcf6ee632;hb=63869e10ac4d8572238989e1b582c0314da91f9c;hp=570b61af1899b8cfd5999fde2d0db5efe0b864e0;hpb=69b0a71f5fe8825fa45ee9502a41fd8b465c44e0;p=ric-plt%2Fsdl.git diff --git a/tst/syncstorageimpl_test.cpp b/tst/syncstorageimpl_test.cpp index 570b61a..3dd9dd4 100644 --- a/tst/syncstorageimpl_test.cpp +++ b/tst/syncstorageimpl_test.cpp @@ -276,6 +276,13 @@ namespace .WillOnce(SaveArg<2>(&savedFindKeysAck)); } + void expectListKeys() + { + EXPECT_CALL(*asyncStorageMockRawPtr, listKeys(ns, _, _)) + .Times(1) + .WillOnce(SaveArg<2>(&savedFindKeysAck)); + } + void expectRemoveAsync(const SyncStorage::Keys& keys) { EXPECT_CALL(*asyncStorageMockRawPtr, removeAsync(ns, keys, _)) @@ -600,6 +607,17 @@ TEST_F(SyncStorageImplTest, FindKeysSuccessfully) EXPECT_EQ(ids, keys); } +TEST_F(SyncStorageImplTest, ListKeysSuccessfully) +{ + InSequence dummy; + expectSdlReadinessCheck(SyncStorageImpl::NO_TIMEOUT); + expectListKeys(); + expectPollWait(SyncStorageImpl::NO_TIMEOUT); + expectFindKeysAck(); + auto ids(syncStorage->listKeys(ns, "*")); + EXPECT_EQ(ids, keys); +} + TEST_F(SyncStorageImplTest, FindKeysWithReadinessTimeoutSuccessfully) { InSequence dummy;