From 4aa75ed896c003cc9727ce487b8450b47a9e5986 Mon Sep 17 00:00:00 2001 From: zqq Date: Mon, 13 Oct 2025 13:47:53 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!3108=20?= =?UTF-8?q?:=20=E3=80=90KV=E3=80=91=E8=AE=BE=E7=BD=AE=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E6=97=B6=E6=A3=80=E6=9F=A5subuser=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=90=88=E6=B3=95'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/src/param_check_utils.cpp | 2 +- ...tributeddb_interfaces_auto_launch_test.cpp | 23 ++----------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/frameworks/libs/distributeddb/common/src/param_check_utils.cpp b/frameworks/libs/distributeddb/common/src/param_check_utils.cpp index 5b80769bb8d..868448d1852 100644 --- a/frameworks/libs/distributeddb/common/src/param_check_utils.cpp +++ b/frameworks/libs/distributeddb/common/src/param_check_utils.cpp @@ -169,7 +169,7 @@ int ParamCheckUtils::CheckAndTransferAutoLaunchParam(const AutoLaunchParam ¶ LOGE("[AutoLaunch] CheckConflictNotifierType is invalid."); return -E_INVALID_ARGS; } - if (!ParamCheckUtils::CheckStoreParameter(param.storeId, param.appId, param.userId, false, param.subUser)) { + if (!ParamCheckUtils::CheckStoreParameter(param.storeId, param.appId, param.userId)) { LOGE("[AutoLaunch] CheckStoreParameter is invalid."); return -E_INVALID_ARGS; } diff --git a/frameworks/libs/distributeddb/test/unittest/common/interfaces/distributeddb_interfaces_auto_launch_test.cpp b/frameworks/libs/distributeddb/test/unittest/common/interfaces/distributeddb_interfaces_auto_launch_test.cpp index bb3a0948c07..846a733a339 100644 --- a/frameworks/libs/distributeddb/test/unittest/common/interfaces/distributeddb_interfaces_auto_launch_test.cpp +++ b/frameworks/libs/distributeddb/test/unittest/common/interfaces/distributeddb_interfaces_auto_launch_test.cpp @@ -472,7 +472,7 @@ HWTEST_F(DistributedDBInterfacesAutoLaunchTest, EnableKvStoreAutoLaunch005, Test } /** - * @tc.name: EnableKvStoreAutoLaunch006 + * @tc.name: EnableKvStoreAutoLaunch005 * @tc.desc: test the over limits for the enable list. * @tc.type: FUNC * @tc.require: @@ -529,25 +529,6 @@ HWTEST_F(DistributedDBInterfacesAutoLaunchTest, EnableKvStoreAutoLaunch006, Test EXPECT_EQ(KvStoreDelegateManager::DisableKvStoreAutoLaunch(USER_ID1, APP_ID1, "store_1"), NOT_FOUND); } -/** - * @tc.name: EnableKvStoreAutoLaunch007 - * @tc.desc: test invalid enable auto launch. - * @tc.type: FUNC - * @tc.author: zqq - */ -HWTEST_F(DistributedDBInterfacesAutoLaunchTest, EnableKvStoreAutoLaunch007, TestSize.Level0) -{ - CipherPassword passwd; - AutoLaunchOption launchOption = {true, false, CipherType::DEFAULT, passwd, "", false, g_testDir, nullptr}; - AutoLaunchParam param; - param.storeId = "store_id"; - param.userId = USER_ID1; - param.appId = APP_ID1; - param.option = launchOption; - param.subUser.resize(129, 'u'); // 129 is invalid length - EXPECT_EQ(KvStoreDelegateManager::EnableKvStoreAutoLaunch(param), INVALID_ARGS); -} - namespace { void SetAutoLaunchLifeCycleTime(const std::string &storeId, uint32_t time) { @@ -564,7 +545,7 @@ void SetAutoLaunchLifeCycleTime(const std::string &storeId, uint32_t time) } } /** - * @tc.name: DisableKvStoreAutoLaunch001 + * @tc.name: EnableKvStoreAutoLaunch007 * @tc.desc: test the over limits for the enable list. * @tc.type: FUNC * @tc.require: -- Gitee