Skip to content

Commit

Permalink
Fix cleanup steps for TC-ACE-1.3/4 (#27050)
Browse files Browse the repository at this point in the history
* Fix cleanup steps for TC-ACE-1.3/4

* Whoops, missed a line.
  • Loading branch information
cecille authored and pull[bot] committed Jan 15, 2024
1 parent 8753159 commit 08dd71f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions src/python_testing/TC_ACE_1_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)


Expand Down
6 changes: 3 additions & 3 deletions src/python_testing/TC_ACE_1_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 08dd71f

Please sign in to comment.