From ff2f07f8cf6aeb9ae7023b9e6e844cc34fbcfd1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=88=E7=9A=93=E6=9D=B0?= Date: Mon, 29 Jul 2024 09:41:43 +0000 Subject: [PATCH] add ut MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 师皓杰 --- .../distributed_sched_permission_test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/services/dtbschedmgr/test/unittest/distributed_sched_permission_test.cpp b/services/dtbschedmgr/test/unittest/distributed_sched_permission_test.cpp index 6834afcc..9bd4b741 100644 --- a/services/dtbschedmgr/test/unittest/distributed_sched_permission_test.cpp +++ b/services/dtbschedmgr/test/unittest/distributed_sched_permission_test.cpp @@ -1769,5 +1769,24 @@ HWTEST_F(DistributedSchedPermissionTest, GetDeviceSecurityLevel_001, TestSize.Le EXPECT_NE(ret, 0); DTEST_LOG << "DistributedSchedPermissionTest GetDeviceSecurityLevel_001 end " << std::endl; } + +/** + * @tc.name: CheckAclList_001 + * @tc.desc: call CheckAclList + * @tc.type: FUNC + * @tc.require: I5RWIV + */ +HWTEST_F(DistributedSchedPermissionTest, CheckAclList_001, TestSize.Level3) +{ + DTEST_LOG << "DistributedSchedPermissionTest CheckAclList_001 begin" << std::endl; + std::string dstNetworkId; + IDistributedSched::AccountInfo dmsAccountInfo; + CallerInfo callerInfo; + DistributedSchedPermission::GetInstance().GetOsAccountData(dmsAccountInfo); + DistributedSchedPermission::GetInstance().CheckDstSameAccount(dstNetworkId, dmsAccountInfo, callerInfo); + bool ret = DistributedSchedPermission::GetInstance().CheckAclList(dstNetworkId, dmsAccountInfo, callerInfo); + EXPECT_EQ(ret, false); + DTEST_LOG << "DistributedSchedPermissionTest CheckAclList_001 end result:" << ret << std::endl; +} } // namespace DistributedSchedule } // namespace OHOS \ No newline at end of file