mirror of
https://gitee.com/openharmony/distributeddatamgr_datamgr_service
synced 2024-11-27 00:51:12 +00:00
update
Signed-off-by: yangliu <yangliu178@huawei.com>
This commit is contained in:
parent
fd64c8ab18
commit
3a83392ed1
@ -177,41 +177,4 @@ HWTEST_F(KvStoreDataServiceTest, AppExit001, TestSize.Level1)
|
||||
OHOS::DistributedKv::AppId appId = { "ohos.test.kvstoredataservice" };
|
||||
Status status = kvStoreDataServiceTest.AppExit(uid, pid, token, appId);
|
||||
EXPECT_EQ(status, SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: ConvertSecurity001
|
||||
* @tc.desc:
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
* @tc.author: wangbin
|
||||
*/
|
||||
HWTEST_F(KvStoreDataServiceTest, ConvertSecurity001, TestSize.Level1)
|
||||
{
|
||||
KvStoreDataService kvStoreDataServiceTest;
|
||||
auto object = kvStoreDataServiceTest.ConvertSecurity(0);
|
||||
ASSERT_NE(&object, nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: InitNbDbOption001
|
||||
* @tc.desc:
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
* @tc.author: wangbin
|
||||
*/
|
||||
HWTEST_F(KvStoreDataServiceTest, InitNbDbOption001, TestSize.Level1)
|
||||
{
|
||||
KvStoreDataService kvStoreDataServiceTest;
|
||||
DistributedDB::KvStoreNbDelegate::Option dbOption;
|
||||
Options options = {
|
||||
.createIfMissing = false,
|
||||
.encrypt = true,
|
||||
.autoSync = false,
|
||||
.securityLevel = 1,
|
||||
};
|
||||
std::vector<uint8_t> decryptKey;
|
||||
DistributedDB::KvStoreNbDelegate::Option dbOptions;
|
||||
auto status = kvStoreDataServiceTest.InitNbDbOption(options, decryptKey, dbOptions);
|
||||
EXPECT_EQ(status, SUCCESS);
|
||||
}
|
@ -598,8 +598,9 @@ HWTEST_F(KvdbServiceImplTest, ResolveAutoLaunch, TestSize.Level0)
|
||||
EXPECT_NE(kvStore, nullptr);
|
||||
EXPECT_EQ(status, Status::SUCCESS);
|
||||
std::string identifier = "identifier";
|
||||
bool isFind = false;
|
||||
DistributedKv::KVDBServiceImpl::DBLaunchParam launchParam;
|
||||
auto result = kvdbServiceImpl_->ResolveAutoLaunch(identifier, launchParam);
|
||||
auto result = kvdbServiceImpl_->ResolveAutoLaunch(identifier, launchParam, isFind);
|
||||
EXPECT_EQ(result, Status::STORE_NOT_FOUND);
|
||||
std::shared_ptr<ExecutorPool> executors = std::make_shared<ExecutorPool>(1, 0);
|
||||
Bootstrap::GetInstance().LoadDirectory();
|
||||
@ -607,7 +608,7 @@ HWTEST_F(KvdbServiceImplTest, ResolveAutoLaunch, TestSize.Level0)
|
||||
DistributedKv::KvStoreMetaManager::GetInstance().BindExecutor(executors);
|
||||
DistributedKv::KvStoreMetaManager::GetInstance().InitMetaParameter();
|
||||
DistributedKv::KvStoreMetaManager::GetInstance().InitMetaListener();
|
||||
result = kvdbServiceImpl_->ResolveAutoLaunch(identifier, launchParam);
|
||||
result = kvdbServiceImpl_->ResolveAutoLaunch(identifier, launchParam, isFind);
|
||||
EXPECT_EQ(result, Status::SUCCESS);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user