Skip to content

Commit

Permalink
TC-IDM-1.2: Use random discriminator (project-chip#31046)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored Dec 17, 2023
1 parent cdf984e commit ea52241
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python_testing/TC_IDM_1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import inspect
import logging
import random
from dataclasses import dataclass

import chip.clusters as Clusters
Expand Down Expand Up @@ -184,7 +185,7 @@ async def test_TC_IDM_1_2(self):
# The only way to have no accessing fabric is to have a PASE session and no added NOC
# KeySetRead - fabric scoped command, should not be accessible over PASE
# To get a PASE session, we need an open commissioning window
discriminator = self.matter_test_config.discriminators[0] + 1
discriminator = random.randint(0, 4095)

params = self.default_controller.OpenCommissioningWindow(
nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=discriminator, option=1)
Expand Down Expand Up @@ -260,7 +261,7 @@ async def test_TC_IDM_1_2(self):
# Try with RevokeCommissioning
# First open a commissioning window for us to revoke, so we know this command is able to succeed absent this error
_ = self.default_controller.OpenCommissioningWindow(
nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=1234, option=1)
nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=discriminator, option=1)
cmd = FakeRevokeCommissioning()
try:
await self.default_controller.TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke(nodeid=self.dut_node_id, endpoint=0, payload=cmd)
Expand Down

0 comments on commit ea52241

Please sign in to comment.