Skip to content

Commit

Permalink
TC-ACE-2.1/2: Add commissioning step (#31715)
Browse files Browse the repository at this point in the history
This is apparently what the TH is using to determine if a test
requires commissioning, so we best add it.
  • Loading branch information
cecille authored Feb 8, 2024
1 parent e5a3250 commit 4196fd0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/python_testing/TC_AccessChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ async def _run_write_access_test_for_cluster_privilege(self, endpoint_id, cluste
await self.TH2.WriteAttribute(nodeid=self.dut_node_id, attributes=[(endpoint_id, attribute(val))])

async def run_access_test(self, test_type: AccessTestType):
# Step 1 and 2 are handled in the class setup, but need to be marked for every test
# Step precondition, 1 and 2 are handled in the class setup, but need to be marked for every test
self.step("precondition")
self.step(1)
self.step(2)
# Read all the attributes on TH2 using admin access
Expand Down Expand Up @@ -234,7 +235,8 @@ async def run_access_test(self, test_type: AccessTestType):
self.fail_current_test("One or more access violations was found")

def steps_TC_ACE_2_1(self):
steps = [TestStep(1, "TH_commissioner performs a wildcard read"),
steps = [TestStep("precondition", "DUT is commissioned", is_commissioning=True),
TestStep(1, "TH_commissioner performs a wildcard read"),
TestStep(2, "TH_commissioner reads the ACL attribute"),
TestStep(3, "Repeat steps 3a and 3b for each permission level")]
enum = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum
Expand All @@ -254,7 +256,8 @@ async def test_TC_ACE_2_1(self):
await self.run_access_test(AccessTestType.READ)

def steps_TC_ACE_2_2(self):
steps = [TestStep(1, "TH_commissioner performs a wildcard read"),
steps = [TestStep("precondition", "DUT is commissioned", is_commissioning=True),
TestStep(1, "TH_commissioner performs a wildcard read"),
TestStep(2, "TH_commissioner reads the ACL attribute"),
TestStep(3, "TH_commissioner grants TH_second_controller admin permission"),
TestStep(4, "TH_second_controller performs a wildcard read"),
Expand Down

0 comments on commit 4196fd0

Please sign in to comment.