diff --git a/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp b/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp index 85f469ebf7229d2fa7b333bae4a85e97ca8fc6c1..ef69b65bbfc91e3481e39578484f13893c96962f 100644 --- a/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp +++ b/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp @@ -120,7 +120,6 @@ HWTEST_F(SecCompKitTest, ExceptCall001, TestSize.Level1) int32_t scId = -1; std::string jsonStr = jsonRes.dump(); ASSERT_NE(SC_OK, SecCompKit::RegisterSecurityComponent(LOCATION_COMPONENT, jsonStr, scId)); - ASSERT_EQ(-1, scId); ASSERT_NE(SC_OK, SecCompKit::UpdateSecurityComponent(scId, jsonStr)); struct SecCompClickEvent touch = { @@ -137,7 +136,7 @@ HWTEST_F(SecCompKitTest, ExceptCall001, TestSize.Level1) } /** - * @tc.name: ExceptCall001 + * @tc.name: TestCallerCheck001 * @tc.desc: test caller check. * @tc.type: FUNC * @tc.require: AR000HO9JS @@ -162,7 +161,7 @@ HWTEST_F(SecCompKitTest, TestCallerCheck001, TestSize.Level1) } /** - * @tc.name: ExceptCall002 + * @tc.name: TestCallerCheck002 * @tc.desc: test invalid caller register. * @tc.type: FUNC * @tc.require: AR000HO9JS diff --git a/services/security_component_service/sa/test/unittest/src/sec_comp_manager_test.cpp b/services/security_component_service/sa/test/unittest/src/sec_comp_manager_test.cpp index e061d8cc31eb9458885445c391336d98443139e2..845a80196f97812cfe00819d04a76388d1b9ddfd 100644 --- a/services/security_component_service/sa/test/unittest/src/sec_comp_manager_test.cpp +++ b/services/security_component_service/sa/test/unittest/src/sec_comp_manager_test.cpp @@ -695,30 +695,6 @@ HWTEST_F(SecCompManagerTest, DumpSecComp001, TestSize.Level1) SecCompManager::GetInstance().DumpSecComp(dumpStr); } -/** - * @tc.name: TransformCallBackResult001 - * @tc.desc: Test check TransformCallBackResult - * @tc.type: FUNC - * @tc.require: AR000HO9J7 - */ -HWTEST_F(SecCompManagerTest, TransformCallBackResult001, TestSize.Level1) -{ - int32_t scId = INVALID_SC_ID; - const std::string scene = "REGISTER"; - int32_t res = SC_ENHANCE_ERROR_NOT_EXIST_ENHANCE; - SecCompManager::GetInstance().SendCheckInfoEnhanceSysEvent(scId, LOCATION_COMPONENT, scene, res); - res = SC_ENHANCE_ERROR_VALUE_INVALID; - SecCompManager::GetInstance().SendCheckInfoEnhanceSysEvent(scId, LOCATION_COMPONENT, scene, res); - res = SC_ENHANCE_ERROR_CALLBACK_OPER_FAIL; - SecCompManager::GetInstance().SendCheckInfoEnhanceSysEvent(scId, LOCATION_COMPONENT, scene, res); - res = SC_SERVICE_ERROR_COMPONENT_INFO_INVALID; - SecCompManager::GetInstance().SendCheckInfoEnhanceSysEvent(scId, LOCATION_COMPONENT, scene, res); - res = SC_ENHANCE_ERROR_CALLBACK_CHECK_FAIL; - SecCompManager::GetInstance().SendCheckInfoEnhanceSysEvent(scId, LOCATION_COMPONENT, scene, res); - res = SC_SERVICE_ERROR_VALUE_INVALID; - SecCompManager::GetInstance().SendCheckInfoEnhanceSysEvent(scId, LOCATION_COMPONENT, scene, res); -} - /** * @tc.name: AddSecurityComponentProcess001 * @tc.desc: Test AddSecurityComponentProcess diff --git a/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp b/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp index bf2a052285787597865937b6d1fc231fb3dd82b0..5efee238c2f1911cb1273eb88d31ccad311fa340 100644 --- a/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp +++ b/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp @@ -100,7 +100,12 @@ HWTEST_F(SecCompPermManagerTest, RevokeTempSavePermissionCount001, TestSize.Leve permMgr.applySaveCountMap_[id] = 1; permMgr.RevokeTempSavePermissionCount(static_cast(0)); - ASSERT_EQ(permMgr.applySaveCountMap_[id], 1); + permMgr.saveTaskDequeMap_[id].push_back("test"); + permMgr.RevokeTempSavePermissionCount(static_cast(0)); + + permMgr.secHandler_ = std::make_shared(nullptr); + permMgr.RevokeTempSavePermissionCount(static_cast(0)); + ASSERT_EQ(permMgr.applySaveCountMap_[id], 0); } /**