From 08dd71fd69fbafda355ad671850f6f4c28beea63 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 8 Jun 2023 21:04:03 -0400 Subject: [PATCH] Fix cleanup steps for TC-ACE-1.3/4 (#27050) * Fix cleanup steps for TC-ACE-1.3/4 * Whoops, missed a line. --- src/python_testing/TC_ACE_1_3.py | 12 ++++++++---- src/python_testing/TC_ACE_1_4.py | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/python_testing/TC_ACE_1_3.py b/src/python_testing/TC_ACE_1_3.py index 3fa0383219be03..a24db8aa18de67 100644 --- a/src/python_testing/TC_ACE_1_3.py +++ b/src/python_testing/TC_ACE_1_3.py @@ -60,9 +60,7 @@ async def test_TC_ACE_1_3(self): logging.info('cat1v1 0x%x', cat1v1) self.print_step(1, "Commissioning, already done") - TH0 = self.default_controller - # _ = TH0 Hack for flake8 F841 local variable 'TH0' is assigned to but never used - _ = TH0 + fabric_admin = self.certificate_authority_manager.activeCaList[0].adminList[0] TH0_nodeid = self.matter_test_config.controller_node_id @@ -343,7 +341,13 @@ async def test_TC_ACE_1_3(self): self.print_step(58, "TH0 writes ACL back to default") - acl = [TH0_admin_acl] + full_acl = Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=[TH0_nodeid], + targets=[]) + + acl = [full_acl] await self.write_acl(acl) diff --git a/src/python_testing/TC_ACE_1_4.py b/src/python_testing/TC_ACE_1_4.py index 0878e7d8e57395..2808be4559ae98 100644 --- a/src/python_testing/TC_ACE_1_4.py +++ b/src/python_testing/TC_ACE_1_4.py @@ -336,13 +336,13 @@ async def test_TC_ACE_1_4(self): self.check_read_success(appcluster_wildcard, self.endpoint, self.cluster, self.attribute) self.print_step(48, "TH1 resets ACL") - descriptor_appendpoint_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( - privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, + full_acl = Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[self.matter_test_config.controller_node_id], targets=[]) - acl = [admin_acl, descriptor_appendpoint_view] + acl = [full_acl] await self.write_acl(acl)