diff --git a/services/bundlemgr/test/unittest/bms_bundle_app_provision_info_test/bms_bundle_app_provision_info_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_app_provision_info_test/bms_bundle_app_provision_info_test.cpp index a131d63f1dd3d5689afe08f31e5dce8a7cbad9be..82adc7f91c802073783990659a810cfea73dc119 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_app_provision_info_test/bms_bundle_app_provision_info_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_app_provision_info_test/bms_bundle_app_provision_info_test.cpp @@ -1131,6 +1131,45 @@ HWTEST_F(BmsBundleAppProvisionInfoTest, InnerSharedBundleInstallerTest_1400, Fun EXPECT_EQ(ret, ERR_OK); } +/** + * @tc.number: InnerSharedBundleInstallerTest_1500 + * @tc.name: test the start function of ProcessNativeLibrary + * @tc.desc: 1.Test ProcessNativeLibrary +*/ +HWTEST_F(BmsBundleAppProvisionInfoTest, InnerSharedBundleInstallerTest_1500, Function | SmallTest | Level0) +{ + InnerSharedBundleInstaller installer(HAP_FILE_PATH1); + std::string versionDir = "data/test"; + InnerBundleInfo newInfo; + InnerModuleInfo innerModuleInfo; + innerModuleInfo.compressNativeLibs = false; + innerModuleInfo.nativeLibraryPath = HAP_FILE_PATH1; + innerModuleInfo.moduleName = TEST_MODULE_NAME; + newInfo.innerModuleInfos_.emplace(TEST_MODULE_NAME, innerModuleInfo); + auto ret = installer.ProcessNativeLibrary( + HAP_FILE_PATH1, TEST_MODULE_NAME, TEST_MODULE_NAME, versionDir, newInfo); + EXPECT_EQ(ret, ERR_OK); +} + +/** + * @tc.number: InnerSharedBundleInstallerTest_1600 + * @tc.name: test the start function of ProcessNativeLibrary + * @tc.desc: 1.Test ProcessNativeLibrary +*/ +HWTEST_F(BmsBundleAppProvisionInfoTest, InnerSharedBundleInstallerTest_1600, Function | SmallTest | Level0) +{ + InnerSharedBundleInstaller installer(HAP_FILE_PATH1); + std::string versionDir = "data/test"; + InnerBundleInfo newInfo; + InnerModuleInfo innerModuleInfo; + innerModuleInfo.compressNativeLibs = false; + innerModuleInfo.nativeLibraryPath = HAP_FILE_PATH1; + newInfo.innerModuleInfos_.emplace(TEST_MODULE_NAME, innerModuleInfo); + auto ret = installer.ProcessNativeLibrary( + HAP_FILE_PATH1, TEST_MODULE_NAME, TEST_MODULE_NAME, versionDir, newInfo); + EXPECT_EQ(ret, ERR_OK); +} + /** * @tc.number: InnerProcessStockBundleProvisionInfo_0001 * @tc.name: test the start function of InnerProcessStockBundleProvisionInfo diff --git a/services/bundlemgr/test/unittest/bms_bundle_clone_installer_test/bms_bundle_clone_installer_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_clone_installer_test/bms_bundle_clone_installer_test.cpp index 7de4187b271257951a56a4ff82272b077b129f1c..4b6b107d31b53afcebbf3499cfb6a12e3c000082 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_clone_installer_test/bms_bundle_clone_installer_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_clone_installer_test/bms_bundle_clone_installer_test.cpp @@ -193,6 +193,10 @@ HWTEST_F(BmsBundleCloneInstallerTest, BmsBundleCloneInstallerTest_001, TestSize. EXPECT_EQ(bundleCloneInstall_->ProcessCloneBundleInstall(BUNDLE_NAME, userId_, appIdx_), ERR_APPEXECFWK_CLONE_INSTALL_NOT_INSTALLED_AT_SPECIFIED_USERID); + int32_t appIndex = 0; + SetUserIdToDataMgr(installer); + EXPECT_EQ(bundleCloneInstall_->ProcessCloneBundleInstall(BUNDLE_NAME, installer, appIndex), + ERR_APPEXECFWK_INSTALLD_GET_PROXY_ERROR); EXPECT_EQ(bundleCloneInstall_->ProcessCloneBundleUninstall("", userId_, appIdx_), ERR_APPEXECFWK_CLONE_UNINSTALL_INVALID_BUNDLE_NAME); @@ -202,6 +206,9 @@ HWTEST_F(BmsBundleCloneInstallerTest, BmsBundleCloneInstallerTest_001, TestSize. EXPECT_EQ(bundleCloneInstall_->ProcessCloneBundleUninstall(BUNDLE_NAME, userId_, 6), ERR_APPEXECFWK_CLONE_UNINSTALL_INVALID_APP_INDEX); + + EXPECT_EQ(bundleCloneInstall_->ProcessCloneBundleUninstall(BUNDLE_NAME, installer, appIndex), + ERR_APPEXECFWK_CLONE_UNINSTALL_APP_NOT_CLONED); } /** @@ -258,4 +265,52 @@ HWTEST_F(BmsBundleCloneInstallerTest, BmsBundleCloneInstallerTest_005, TestSize. EXPECT_EQ( bundleCloneInstall_->RemoveCloneDataDir("", userId_, appIdx_), ERR_APPEXECFWK_CLONE_INSTALL_INTERNAL_ERROR); } + +/** + * @tc.number: BmsBundleCloneInstallerTest_006 + * @tc.name: UninstallAllCloneApps + * @tc.desc: test UninstallAllCloneApps() + */ +HWTEST_F(BmsBundleCloneInstallerTest, BmsBundleCloneInstallerTest_006, TestSize.Level1) +{ + std::string bundleName = ""; + EXPECT_EQ(bundleCloneInstall_->UninstallAllCloneApps(bundleName, userId_), + ERR_APPEXECFWK_CLONE_UNINSTALL_INVALID_BUNDLE_NAME); + bundleName = "bundleName006"; + int32_t userId = 101; + EXPECT_EQ(bundleCloneInstall_->UninstallAllCloneApps(bundleName, userId), + ERR_APPEXECFWK_CLONE_UNINSTALL_USER_NOT_EXIST); + EXPECT_EQ(bundleCloneInstall_->UninstallAllCloneApps(bundleName, userId_), + ERR_APPEXECFWK_CLONE_UNINSTALL_APP_NOT_EXISTED); + SetInnerBundleInfo(bundleName); + ScopeGuard deleteGuard([this, bundleName] { DeleteBundle(bundleName); }); + EXPECT_EQ(bundleCloneInstall_->UninstallAllCloneApps(bundleName, userId_), + ERR_APPEXECFWK_CLONE_UNINSTALL_NOT_INSTALLED_AT_SPECIFIED_USERID); + int32_t appIndex = 0; + bundleCloneInstall_->InstallCloneApp(bundleName, installer, appIndex); + EXPECT_EQ(bundleCloneInstall_->UninstallAllCloneApps(bundleName, installer), ERR_OK); +} + +/** + * @tc.number: BmsBundleCloneInstallerTest_007 + * @tc.name: GetDataMgr + * @tc.desc: test GetDataMgr() + */ +HWTEST_F(BmsBundleCloneInstallerTest, BmsBundleCloneInstallerTest_007, TestSize.Level1) +{ + EXPECT_EQ(bundleCloneInstall_->GetDataMgr(), ERR_OK); +} + +/** + * @tc.number: BmsBundleCloneInstallerTest_008 + * @tc.name: ResetInstallProperties + * @tc.desc: test ResetInstallProperties() + */ +HWTEST_F(BmsBundleCloneInstallerTest, BmsBundleCloneInstallerTest_008, TestSize.Level1) +{ + bundleCloneInstall_->ResetInstallProperties(); + EXPECT_EQ(bundleCloneInstall_->uid_, 0); + EXPECT_EQ(bundleCloneInstall_->accessTokenId_, 0); +} + } diff --git a/services/bundlemgr/test/unittest/bms_bundle_free_install_test/bms_bundle_free_install_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_free_install_test/bms_bundle_free_install_test.cpp index 3f9a71897cdef66b8283d05c812ba5bae99009d0..615e748e8f20a66ede5c57df4e34447990beedc6 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_free_install_test/bms_bundle_free_install_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_free_install_test/bms_bundle_free_install_test.cpp @@ -1727,6 +1727,34 @@ HWTEST_F(BmsBundleFreeInstallTest, SortAgingBundles_0100, Function | SmallTest | EXPECT_EQ(ret, request.GetAgingBundles().size()); } +/* + * @tc.number: SortAgingBundles_0200 + * @tc.name: test SortAgingBundles + * @tc.desc: 1.test SortAgingBundles of AgingUtil + */ +HWTEST_F(BmsBundleFreeInstallTest, SortAgingBundles_0200, Function | SmallTest | Level0) +{ + AgingUtil util; + AgingBundleInfo bundleInfo; + std::vector bundles; + bundles.push_back(bundleInfo); + bundles.push_back(bundleInfo); + util.SortAgingBundles(bundles); + EXPECT_FALSE(bundles.empty()); +} + +/* + * @tc.number: CheckPrerequisite_0100 + * @tc.name: test CheckPrerequisite + * @tc.desc: 1.test CheckPrerequisite of BundleAgingMgr + */ +HWTEST_F(BmsBundleFreeInstallTest, CheckPrerequisite_0100, Function | SmallTest | Level0) +{ + BundleAgingMgr bundleAgingMgr; + bool ret = bundleAgingMgr.CheckPrerequisite(AppExecFwk::BundleAgingMgr::AgingTriggertype::PREIOD); + EXPECT_FALSE(ret); +} + /* * @tc.number: ResetRequest_0100 * @tc.name: test ResetRequest diff --git a/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_app_service_fwk_installer.cpp b/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_app_service_fwk_installer.cpp index 728d21e23024fa266f5cb5ab2100241dd8a62a0d..b697f5c2ab2241b271c35f325b8cd5ab330529ea 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_app_service_fwk_installer.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_app_service_fwk_installer.cpp @@ -1151,4 +1151,82 @@ HWTEST_F(BmsBundleAppServiceFwkInstallerTest, GetAllBundleInfoByDeveloperId_0100 auto ret3 = dataMgr->GetAllBundleInfoByDeveloperId(STRING, bundleInfos, Constants::ANY_USERID); EXPECT_NE(ret3, ERR_OK); } + +/** + * @tc.number: VerifyCodeSignatureForNativeFiles_0010 + * @tc.name: test VerifyCodeSignatureForNativeFiles + * @tc.desc: 1.verify the code signature of the local file +*/ +HWTEST_F(BmsBundleAppServiceFwkInstallerTest, VerifyCodeSignatureForNativeFiles_0010, Function | SmallTest | Level1) +{ + AppServiceFwkInstaller appServiceFwkInstaller; + InitAppServiceFwkInstaller(appServiceFwkInstaller); + appServiceFwkInstaller.bundleName_ = BUNDLE_NAME; + + auto dataMgr = GetBundleDataMgr(); + ASSERT_NE(dataMgr, nullptr); + dataMgr->installStates_[BUNDLE_NAME] = InstallState::INSTALL_SUCCESS; + + std::string bundlePath; + std::string cpuAbi; + std::string targetSoPath; + auto res = appServiceFwkInstaller.VerifyCodeSignatureForNativeFiles(bundlePath, cpuAbi, targetSoPath); + EXPECT_NE(res, ERR_OK); + + DeleteBundleInfo(BUNDLE_NAME); + DeletePreBundleInfo(BUNDLE_NAME); + dataMgr->installStates_.erase(BUNDLE_NAME); +} + +/** + * @tc.number: RollBack_0010 + * @tc.name: test RollBack + * @tc.desc: 1.test roll back +*/ +HWTEST_F(BmsBundleAppServiceFwkInstallerTest, RollBack_0010, Function | SmallTest | Level1) +{ + AppServiceFwkInstaller appServiceFwkInstaller; + InitAppServiceFwkInstaller(appServiceFwkInstaller); + appServiceFwkInstaller.bundleName_ = BUNDLE_NAME; + + auto dataMgr = GetBundleDataMgr(); + ASSERT_NE(dataMgr, nullptr); + dataMgr->installStates_[BUNDLE_NAME] = InstallState::INSTALL_SUCCESS; + + appServiceFwkInstaller.RollBack(); + InnerBundleInfo innerBundleInfo; + auto res = appServiceFwkInstaller.RemoveBundleCodeDir(innerBundleInfo); + appServiceFwkInstaller.RemoveInfo(EMPTY_STRING); + EXPECT_NE(res, ERR_OK); + + DeleteBundleInfo(BUNDLE_NAME); + DeletePreBundleInfo(BUNDLE_NAME); + dataMgr->installStates_.erase(BUNDLE_NAME); +} + +/** + * @tc.number: ProcessModuleUpdate_0010 + * @tc.name: test ProcessModuleUpdate + * @tc.desc: 1.test process module update +*/ +HWTEST_F(BmsBundleAppServiceFwkInstallerTest, ProcessModuleUpdate_0010, Function | SmallTest | Level1) +{ + AppServiceFwkInstaller appServiceFwkInstaller; + InitAppServiceFwkInstaller(appServiceFwkInstaller); + appServiceFwkInstaller.bundleName_ = BUNDLE_NAME; + + auto dataMgr = GetBundleDataMgr(); + ASSERT_NE(dataMgr, nullptr); + dataMgr->installStates_[BUNDLE_NAME] = InstallState::INSTALL_SUCCESS; + + InnerBundleInfo newInfo; + InnerBundleInfo oldInfo; + std::string hspPath; + auto res = appServiceFwkInstaller.ProcessModuleUpdate(newInfo, oldInfo, hspPath); + EXPECT_NE(res, ERR_OK); + + DeleteBundleInfo(BUNDLE_NAME); + DeletePreBundleInfo(BUNDLE_NAME); + dataMgr->installStates_.erase(BUNDLE_NAME); +} } diff --git a/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test.cpp index 65ee6e5e76ade3553eb69cfd0fce6113d4b6fe51..e221570be012762f82a633859ea4f446c17db1d2 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test.cpp @@ -13,6 +13,7 @@ * limitations under the License. */ #define private public +#define protected public #include @@ -5946,4 +5947,33 @@ HWTEST_F(BmsBundleManagerTest, GetRecoverableApplicationInfo_0100, Function | Me ret = preInstallDataStorage->DeletePreInstallStorageBundleInfo(preInstallBundleInfo); EXPECT_TRUE(ret); } + +/** +* @tc.number: InitVerifyManager_0010 +* @tc.name: test InitVerifyManager +* @tc.desc: 1.test initialize the verify manager +*/ +HWTEST_F(BmsBundleManagerTest, InitVerifyManager_0010, Function | SmallTest | Level1) +{ + bool ret = DelayedSingleton::GetInstance()->InitVerifyManager(); + EXPECT_EQ(ret, true); + auto result = DelayedSingleton::GetInstance()->GetVerifyManager(); + EXPECT_NE(result, nullptr); +} + +/** +* @tc.number: InitExtendResourceManager_0010 +* @tc.name: test InitExtendResourceManager +* @tc.desc: 1.test initialize the extended resource manager +*/ +HWTEST_F(BmsBundleManagerTest, InitExtendResourceManager_0010, Function | SmallTest | Level1) +{ + bool ret = DelayedSingleton::GetInstance()->InitExtendResourceManager(); + EXPECT_EQ(ret, true); + int32_t systemAbilityId = COMMON_EVENT_SERVICE_ID; + std::string deviceId; + DelayedSingleton::GetInstance()->OnAddSystemAbility(systemAbilityId, deviceId); + auto result = DelayedSingleton::GetInstance()->GetExtendResourceManager(); + EXPECT_NE(result, nullptr); +} } // OHOS diff --git a/services/bundlemgr/test/unittest/bms_bundle_verifymanager_test/bms_bundle_verifymanager_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_verifymanager_test/bms_bundle_verifymanager_test.cpp index 1e522d895d93e09298c2270326c5ef800b937fe9..ddd11914ff6fadd5ed80d67e446c377198625e46 100755 --- a/services/bundlemgr/test/unittest/bms_bundle_verifymanager_test/bms_bundle_verifymanager_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_verifymanager_test/bms_bundle_verifymanager_test.cpp @@ -79,6 +79,7 @@ public: static void TearDownTestCase(); void SetUp(); void TearDown(); + void SetBundleDataMgr(); private: static std::shared_ptr bundleMgrService_; @@ -107,6 +108,12 @@ void BmsBundleVerifyManagerTest::SetUp() void BmsBundleVerifyManagerTest::TearDown() {} +void BmsBundleVerifyManagerTest::SetBundleDataMgr() +{ + DelayedSingleton::GetInstance()->dataMgr_ = std::make_shared(); + EXPECT_TRUE(DelayedSingleton::GetInstance()->dataMgr_ != nullptr); +} + /** * @tc.number: VerifyAbc * @tc.name: test VerifyAbc @@ -119,7 +126,7 @@ HWTEST_F(BmsBundleVerifyManagerTest, VerifyManagerTest_0100, Function | SmallTes abcPaths.push_back(FILE_PATH); abcPaths.push_back(ERR_FILE_PATH); abcPaths.push_back(EMPTY_STRING); - + SetBundleDataMgr(); auto ret = impl.VerifyAbc(abcPaths); EXPECT_FALSE(ret); } @@ -394,4 +401,16 @@ HWTEST_F(BmsBundleVerifyManagerTest, VerifyManagerTest_1400, Function | SmallTes EXPECT_FALSE(ret); } + +/** + * @tc.number: GetBundleMutex + * @tc.name: test GetBundleMutex + * @tc.desc: 1.GetBundleMutex test + */ +HWTEST_F(BmsBundleVerifyManagerTest, VerifyManagerTest_1500, Function | SmallTest | Level1) +{ + VerifyManagerHostImpl impl; + auto &mtx = impl.GetBundleMutex(BUNDLE_NAME); + EXPECT_EQ(&mtx, &impl.bundleMutexMap_[BUNDLE_NAME]); +} } // OHOS \ No newline at end of file diff --git a/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp b/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp index a0488d6fa8b58b328f5fe3f8bf3f9ee11d680993..ea4a4aa34df9d2c792f651cdf2ae7c0d71688c27 100644 --- a/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp +++ b/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp @@ -177,6 +177,18 @@ HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0002, Function | SmallTest #endif } +/** + * @tc.number: BmsExtensionDataMgr_0003 + * @tc.name: CheckApiInfo + * @tc.desc: CheckApiInfo + */ +HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0003, Function | SmallTest | Level0) +{ + BmsExtensionDataMgr bmsExtensionDataMgr; + bool res = bmsExtensionDataMgr.CheckApiInfo(SDK_VERSION, SDK_VERSION); + EXPECT_TRUE(res); +} + /** * @tc.number: BmsExtensionDataMgr_0004 * @tc.name: QueryAbilityInfosWithFlag @@ -816,4 +828,16 @@ HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0028, Function | SmallTest EXPECT_NE(res, ERR_OK); #endif } + +/** + * @tc.number: BmsExtensionDataMgr_0024 + * @tc.name: Init + * @tc.desc: Init + */ +HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0024, Function | SmallTest | Level0) +{ + BmsExtensionDataMgr bmsExtensionDataMgr; + bool res = bmsExtensionDataMgr.Init(); + EXPECT_TRUE(res); +} } // OHOS \ No newline at end of file diff --git a/services/bundlemgr/test/unittest/bms_extend_resource_manager_test/bms_extend_resource_manager_test.cpp b/services/bundlemgr/test/unittest/bms_extend_resource_manager_test/bms_extend_resource_manager_test.cpp index 8d7e53baf76b325604b0a67ed852dcf799da0d75..5a107702026c148ae4651cb1a10e49d86d54aac2 100644 --- a/services/bundlemgr/test/unittest/bms_extend_resource_manager_test/bms_extend_resource_manager_test.cpp +++ b/services/bundlemgr/test/unittest/bms_extend_resource_manager_test/bms_extend_resource_manager_test.cpp @@ -458,4 +458,47 @@ HWTEST_F(BmsExtendResourceManagerTest, DynamicIconTest_0500, Function | SmallTes ret = impl.GetDynamicIcon(BUNDLE_NAME2, moudleName); EXPECT_FALSE(moudleName.empty()); } + +/** + * @tc.number: CreateFd_0100 + * @tc.name: test CreateFd + * @tc.desc: 1.test create fd by bundle name and path + */ +HWTEST_F(BmsExtendResourceManagerTest, CreateFd_0100, Function | SmallTest | Level1) +{ + ExtendResourceManagerHostImpl impl; + std::string fileName; + int32_t fd = 0; + std::string path = FILE_PATH; + ErrCode code = impl.CreateFd(fileName, fd, path); + EXPECT_EQ(code, ERR_EXT_RESOURCE_MANAGER_CREATE_FD_FAILED); + code = impl.CreateFd(BUNDLE_NAME, fd, path); + EXPECT_NE(code, ERR_OK); +} + +/** + * @tc.number: ResetBundleResourceIcon_0100 + * @tc.name: test ResetBundleResourceIcon + * @tc.desc: 1.reset bundle resource icon + */ +HWTEST_F(BmsExtendResourceManagerTest, ResetBundleResourceIcon_0100, Function | SmallTest | Level1) +{ + ExtendResourceManagerHostImpl impl; + bool ret = impl.ResetBundleResourceIcon(BUNDLE_NAME); + EXPECT_EQ(ret, false); +} + +/** + * @tc.number: ParseBundleResource_0100 + * @tc.name: test ParseBundleResource + * @tc.desc: 1.analyze bundled package resources + */ +HWTEST_F(BmsExtendResourceManagerTest, ParseBundleResource_0100, Function | SmallTest | Level1) +{ + ExtendResourceManagerHostImpl impl; + std::string bundleName = BUNDLE_NAME; + ExtendResourceInfo extendResourceInfo; + bool ret = impl.ParseBundleResource(bundleName, extendResourceInfo); + EXPECT_EQ(ret, false); +} } // OHOS \ No newline at end of file diff --git a/services/bundlemgr/test/unittest/bms_installd_host_test/bms_installd_host_test.cpp b/services/bundlemgr/test/unittest/bms_installd_host_test/bms_installd_host_test.cpp index 0c56b4a94f17a30935ce86478a56772c8d0687b2..1efefa22c6321e8402274da5e27092534d1d9ff2 100644 --- a/services/bundlemgr/test/unittest/bms_installd_host_test/bms_installd_host_test.cpp +++ b/services/bundlemgr/test/unittest/bms_installd_host_test/bms_installd_host_test.cpp @@ -158,6 +158,34 @@ HWTEST_F(BmsInstalldHostTest, HandleExecuteAOT_0100, Function | SmallTest | Leve EXPECT_FALSE(res); } +/** + * @tc.number: HandlePendSignAOT_0100 + * @tc.name: test HandlePendSignAOT + * @tc.desc: 1.HandlePendSignAOT test + */ +HWTEST_F(BmsInstalldHostTest, HandlePendSignAOT_0100, Function | SmallTest | Level1) +{ + InstalldHost installdHost; + MessageParcel data; + MessageParcel reply; + ErrCode res = installdHost.HandlePendSignAOT(data, reply); + EXPECT_TRUE(res); +} + +/** + * @tc.number: HandleStopAOT_0100 + * @tc.name: test HandleStopAOT + * @tc.desc: 1.HandleStopAOT test + */ +HWTEST_F(BmsInstalldHostTest, HandleStopAOT_0100, Function | SmallTest | Level1) +{ + InstalldHost installdHost; + MessageParcel data; + MessageParcel reply; + ErrCode res = installdHost.HandleStopAOT(data, reply); + EXPECT_TRUE(res); +} + /** * @tc.number: HandleRenameModuleDir_0100 * @tc.name: test HandleRenameModuleDir @@ -242,6 +270,20 @@ HWTEST_F(BmsInstalldHostTest, HandleRemoveDir_0100, Function | SmallTest | Level EXPECT_TRUE(res); } +/** + * @tc.number: HandleGetDiskUsage_0100 + * @tc.name: test HandleGetDiskUsage + * @tc.desc: 1.HandleGetDiskUsage test + */ +HWTEST_F(BmsInstalldHostTest, HandleGetDiskUsage_0100, Function | SmallTest | Level1) +{ + InstalldHost installdHost; + MessageParcel data; + MessageParcel reply; + ErrCode res = installdHost.HandleGetDiskUsage(data, reply); + EXPECT_TRUE(res); +} + /** * @tc.number: HandleCleanBundleDataDir_0100 * @tc.name: test HandleCleanBundleDataDir @@ -661,4 +703,60 @@ HWTEST_F(BmsInstalldHostTest, HandleDeleteEncryptionKeyId_0100, Function | Small ErrCode res = installdHost.HandleDeleteEncryptionKeyId(data, reply); EXPECT_TRUE(res); } + +/** + * @tc.number: HandleRemoveExtensionDir_0100 + * @tc.name: test HandleRemoveExtensionDir + * @tc.desc: 1.HandleRemoveExtensionDir test + */ +HWTEST_F(BmsInstalldHostTest, HandleRemoveExtensionDir_0100, Function | SmallTest | Level1) +{ + InstalldHost installdHost; + MessageParcel data; + MessageParcel reply; + ErrCode res = installdHost.HandleRemoveExtensionDir(data, reply); + EXPECT_FALSE(res); +} + +/** + * @tc.number: HandleIsExistExtensionDir_0100 + * @tc.name: test HandleIsExistExtensionDir + * @tc.desc: 1.HandleIsExistExtensionDir test + */ +HWTEST_F(BmsInstalldHostTest, HandleIsExistExtensionDir_0100, Function | SmallTest | Level1) +{ + InstalldHost installdHost; + MessageParcel data; + MessageParcel reply; + ErrCode res = installdHost.HandleIsExistExtensionDir(data, reply); + EXPECT_TRUE(res); +} + +/** + * @tc.number: HandleCreateExtensionDataDir_0100 + * @tc.name: test HandleCreateExtensionDataDir + * @tc.desc: 1.HandleCreateExtensionDataDir test + */ +HWTEST_F(BmsInstalldHostTest, HandleCreateExtensionDataDir_0100, Function | SmallTest | Level1) +{ + InstalldHost installdHost; + MessageParcel data; + MessageParcel reply; + ErrCode res = installdHost.HandleCreateExtensionDataDir(data, reply); + EXPECT_TRUE(res); +} + +/** + * @tc.number: HandleGetExtensionSandboxTypeList_0100 + * @tc.name: test HandleGetExtensionSandboxTypeList + * @tc.desc: 1.HandleGetExtensionSandboxTypeList test + */ +HWTEST_F(BmsInstalldHostTest, HandleGetExtensionSandboxTypeList_0100, Function | SmallTest | Level1) +{ + InstalldHost installdHost; + MessageParcel data; + MessageParcel reply; + ErrCode res = installdHost.HandleGetExtensionSandboxTypeList(data, reply); + EXPECT_TRUE(res); +} } // OHOS \ No newline at end of file