Skip to content

Commit

Permalink
TC-DRLK-2.2/2.3/2.12: Modify flow to allow for RequirePINforRemoteOpe…
Browse files Browse the repository at this point in the history
…ration to be TRUE or FALSE (#28523)

* TC-DRLK-2.2/2.3/2.12: Modify flow to allow for RequirePINforRemoteOperation to be TRUE or FALSE

- Modify flow to allow for RequirePINforRemoteOperation to be TRUE or FALSE
- Reorder steps 7-9 to ensure subsequent test of WrongCodeEntryLimit doesn't already have existing failed entry attempts
- Fix incorrect PICS (use .Write PICS) for writing WrongCodeEntryLimit and UserCodeTemporaryDisableTime

Fixes #3263
Fixes #3265
Fixes #3266

* Restyled by autopep8

* Exclude .yaml tests from CI due to use of EqualityTests pseudo-cluster

* Add zap-regen'd files

* Exclude .yaml tests from CI linux due to use of EqualityTests pseudo-cluster

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 16, 2024
1 parent 0187d1b commit 3983419
Show file tree
Hide file tree
Showing 7 changed files with 2,541 additions and 8,134 deletions.
3 changes: 3 additions & 0 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ def _GetChipReplUnsupportedTests() -> Set[str]:
"Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855
"Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584
"Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023)
"Test_TC_DRLK_2_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster (08/04/2023)
"Test_TC_DRLK_2_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster (08/04/2023)
"Test_TC_DRLK_2_12.yaml", # chip-repl does not support EqualityCommands pseudo-cluster (08/04/2023)
"TestGroupKeyManagementCluster.yaml", # chip-repl does not support EqualityCommands (2023-08-04)
"Test_TC_S_2_2.yaml", # chip-repl does not support scenes cluster commands
"Test_TC_S_2_3.yaml", # chip-repl does not support scenes cluster commands
Expand Down
117 changes: 107 additions & 10 deletions src/app/tests/suites/certification/Test_TC_DRLK_2_12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ config:
nodeId: 0x12344321
cluster: "Door Lock"
endpoint: 1
requirePINIsTrue:
type: BOOLEAN
defaultValue: false

tests:
- label: "Wait for the commissioned device to be retrieved"
Expand Down Expand Up @@ -152,13 +155,61 @@ tests:
command: "readAttribute"
attribute: "RequirePINforRemoteOperation"
response:
value: false
saveAs: requirePINIsTrue
constraints:
type: boolean
minValue: 0
maxValue: 1

- label:
"Step 2a: TH verifies the RequirePINforRemoteOperation attribute value
is now False on the DUT"
PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write
cluster: "EqualityCommands"
command: "BooleanEquals"
arguments:
values:
- name: "Value1"
value: requirePINIsTrue
- name: "Value2"
value: false
response:
- values:
- name: "Equals"
value: true

- label: "Step 2b: Compute RequirePINforRemoteOperation"
cluster: "EqualityCommands"
command: "BooleanEquals"
arguments:
values:
- name: "Value1"
value: requirePINIsTrue
- name: "Value2"
value: false
response:
- values:
- name: "Equals"
saveAs: requirePINIsFalse
constraints:
type: boolean
minValue: 0
maxValue: 1

- label: "Step 3: TH sends Ubolt Door Command to the DUT without PINCode"
runIf: requirePINIsFalse
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
timedInteractionTimeoutMs: 1000

- label: "Step 3: TH sends Ubolt Door Command to the DUT without PINCode"
runIf: requirePINIsTrue
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
timedInteractionTimeoutMs: 1000
response:
error: FAILURE

- label: "Step 4: TH sends Ubolt Door Command to the DUT with PINCode"
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
Expand Down Expand Up @@ -195,19 +246,49 @@ tests:
command: "readAttribute"
attribute: "RequirePINforRemoteOperation"
response:
value: true
saveAs: requirePINIsTrue
constraints:
type: boolean
minValue: 0
maxValue: 1

- label: "Step 7: TH sends Ubolt Door Command to the DUT with valid PINCode"
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
timedInteractionTimeoutMs: 1000
- label:
"Step 6a: TH verifies the RequirePINforRemoteOperation attribute value
is now True on the DUT"
PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write
cluster: "EqualityCommands"
command: "BooleanEquals"
arguments:
values:
- name: "PINCode"
value: "123456"
- name: "Value1"
value: requirePINIsTrue
- name: "Value2"
value: true
response:
- values:
- name: "Equals"
value: true

- label: "Step 6b: Compute RequirePINforRemoteOperation"
cluster: "EqualityCommands"
command: "BooleanEquals"
arguments:
values:
- name: "Value1"
value: requirePINIsTrue
- name: "Value2"
value: false
response:
- values:
- name: "Equals"
saveAs: requirePINIsFalse
constraints:
type: boolean
minValue: 0
maxValue: 1

- label:
"Step 8: TH sends Unbolt Door Command to the DUT with Invalid PINCode"
"Step 7: TH sends Unbolt Door Command to the DUT with Invalid PINCode"
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
timedInteractionTimeoutMs: 1000
Expand All @@ -218,13 +299,29 @@ tests:
response:
error: FAILURE

- label: "Step 9: TH sends Unbolt Door Command to the DUT without PINCode"
- label: "Step 8: TH sends Unbolt Door Command to the DUT without PINCode"
runIf: requirePINIsTrue
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
timedInteractionTimeoutMs: 1000
response:
error: FAILURE

- label: "Step 8: TH sends Unbolt Door Command to the DUT without PINCode"
runIf: requirePINIsFalse
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
timedInteractionTimeoutMs: 1000

- label: "Step 9: TH sends Ubolt Door Command to the DUT with valid PINCode"
PICS: DRLK.S.C27.Rsp
command: "UnboltDoor"
timedInteractionTimeoutMs: 1000
arguments:
values:
- name: "PINCode"
value: "123456"

- label:
"Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the
DUT"
Expand Down
Loading

0 comments on commit 3983419

Please sign in to comment.