Skip to content

Commit

Permalink
Fixed DL script issues (#20605)
Browse files Browse the repository at this point in the history
* Fixed Door lock issues

* Added Auto generated files

* Restyled by whitespace

* Restyled by clang-format

* Restyled by prettier-yaml

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
2 people authored and pull[bot] committed Jun 27, 2023
1 parent 2045491 commit 1485842
Show file tree
Hide file tree
Showing 9 changed files with 2,661 additions and 1,106 deletions.
14 changes: 1 addition & 13 deletions src/app/tests/suites/certification/Test_TC_CGEN_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ tests:
maxValue: 2

#Issue 17997
#this step implicitly validating the attribute(BasicCommissioningInfo)constraints, as long as the payload is being parsed successfully
- label:
"TH1 reads BasicCommissioningInfo attribute from DUT and Verify that
the BasicCommissioningInfo attribute has the following field:
Expand All @@ -81,19 +82,6 @@ tests:
command: "readAttribute"
attribute: "BasicCommissioningInfo"

- label:
"Step 6 is implicitly validating the attribute(BasicCommissioningInfo)
constraints, as long as the payload is being parsed successfully"
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT
arguments:
values:
- name: "message"
value: "Please enter 'y' for success"
- name: "expectedValue"
value: "y"

- label: "TH1 reads SupportsConcurrentConnection attribute from the DUT"
PICS: CGEN.S.A0004
command: "readAttribute"
Expand Down
160 changes: 129 additions & 31 deletions src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,56 @@ tests:
- name: "nodeId"
value: nodeId

- label:
"TH writes the RequirePINforRemoteOperation attribute value as False
on the DUT"
PICS: DRLK.S.A0033
command: "writeAttribute"
attribute: "RequirePINforRemoteOperation"
arguments:
value: false

- label: "TH sends Lock Door Command to the DUT without PINCode"
PICS: DRLK.S.C00.Rsp
command: "LockDoor"
- label: "Create new user"
command: "SetUser"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "PINCode"
value: ""
response:
error: FAILURE
- name: "operationType"
value: 0
- name: "userIndex"
value: 1
- name: "userName"
value: "xxx"
- name: "userUniqueId"
value: 6452
- name: "userStatus"
value: 1
- name: "userType"
value: 0
- name: "credentialRule"
value: 0

- label:
"TH writes the RequirePINforRemoteOperation attribute value as True on
the DUT"
PICS: DRLK.S.A0033
command: "writeAttribute"
attribute: "RequirePINforRemoteOperation"
- label: "Read the user back and verify its fields"
command: "GetUser"
arguments:
value: true
values:
- name: "userIndex"
value: 1
response:
values:
- name: "userIndex"
value: 1
- name: "userName"
value: "xxx"
- name: "userUniqueId"
value: 6452
- name: "userStatus"
value: 1
- name: "userType"
value: 0
- name: "credentialRule"
value: 0
- name: "credentials"
value: null
- name: "creatorFabricIndex"
value: 1
- name: "lastModifiedFabricIndex"
value: 1
- name: "nextUserIndex"
value: null

- label: "Create new PIN credential and lock/unlock user"
PICS: DRLK.S.C22.Rsp
command: "SetCredential"
timedInteractionTimeoutMs: 10000
arguments:
Expand All @@ -70,20 +89,80 @@ tests:
- name: "credentialData"
value: "123456"
- name: "userIndex"
value: null
value: 1
- name: "userStatus"
value: null
value: 0
- name: "userType"
value: null
value: 0
response:
values:
- name: "status"
value: 0
- name: "userIndex"
value: 1
value: null
- name: "nextCredentialIndex"
value: 2

- label: "Verify created PIN credential"
command: "GetCredentialStatus"
arguments:
values:
- name: "credential"
value: { CredentialType: 1, CredentialIndex: 1 }
response:
values:
- name: "credentialExists"
value: true
- name: "userIndex"
value: 1
- name: "creatorFabricIndex"
value: 1
- name: "lastModifiedFabricIndex"
value: 1
- name: "nextCredentialIndex"
value: null

- label:
"TH writes the RequirePINforRemoteOperation attribute value as False
on the DUT"
PICS: DRLK.S.A0033
command: "writeAttribute"
attribute: "RequirePINforRemoteOperation"
arguments:
value: false

- label: "TH sends Lock Door Command to the DUT without PINCode"
PICS: DRLK.S.C00.Rsp
command: "LockDoor"
timedInteractionTimeoutMs: 10000
response:
error: 0x00

- label: "TH sends Lock Door Command to the DUT with valid PINCode"
PICS: DRLK.S.C00.Rsp
command: "LockDoor"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "pinCode"
value: "123456"

- label:
"TH writes the RequirePINforRemoteOperation attribute value as True on
the DUT"
PICS: DRLK.S.A0033
command: "writeAttribute"
attribute: "RequirePINforRemoteOperation"
arguments:
value: true

- label: "TH reads the RequirePINforRemoteOperation attribute from the DUT"
PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033
command: "readAttribute"
attribute: "RequirePINforRemoteOperation"
response:
value: true

- label: "TH sends Lock Door Command to the DUT with valid PINCode"
PICS: DRLK.S.C00.Rsp
command: "LockDoor"
Expand All @@ -93,6 +172,17 @@ tests:
- name: "pinCode"
value: "123456"

- label: "TH sends Lock Door Command to the DUT without valid PINCode"
PICS: DRLK.S.C00.Rsp
command: "LockDoor"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "pinCode"
value: "645321"
response:
error: FAILURE

- label:
"TH sends Lock Door Command to the DUT without any argument PINCode"
PICS: DRLK.S.C00.Rsp
Expand All @@ -119,7 +209,7 @@ tests:
command: "writeAttribute"
attribute: "UserCodeTemporaryDisableTime"
arguments:
value: 5
value: 15

- label: "TH sends Lock Door Command to the DUT with invalid PINCode"
PICS: DRLK.S.C00.Rsp
Expand Down Expand Up @@ -170,7 +260,7 @@ tests:
command: "readAttribute"
attribute: "UserCodeTemporaryDisableTime"
response:
value: 5
value: 15

- label: "TH sends Lock Door Command to the DUT with valid PINCode"
PICS: DRLK.S.C00.Rsp
Expand All @@ -181,7 +271,15 @@ tests:
- name: "pinCode"
value: "123456"

- label: "Clean the created credential"
- label: "Clean the created user"
command: "ClearUser"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "userIndex"
value: 1

- label: "Cleanup the created credential"
PICS: DRLK.S.C26.Rsp
command: "ClearCredential"
timedInteractionTimeoutMs: 10000
Expand Down
96 changes: 82 additions & 14 deletions src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,56 @@ tests:
- name: "nodeId"
value: nodeId

- label: "Create new user"
command: "SetUser"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "operationType"
value: 0
- name: "userIndex"
value: 1
- name: "userName"
value: "xxx"
- name: "userUniqueId"
value: 6452
- name: "userStatus"
value: 1
- name: "userType"
value: 0
- name: "credentialRule"
value: 0

- label: "Read the user back and verify its fields"
command: "GetUser"
arguments:
values:
- name: "userIndex"
value: 1
response:
values:
- name: "userIndex"
value: 1
- name: "userName"
value: "xxx"
- name: "userUniqueId"
value: 6452
- name: "userStatus"
value: 1
- name: "userType"
value: 0
- name: "credentialRule"
value: 0
- name: "credentials"
value: null
- name: "creatorFabricIndex"
value: 1
- name: "lastModifiedFabricIndex"
value: 1
- name: "nextUserIndex"
value: null

- label: "Create new PIN credential and lock/unlock user"
PICS: DRLK.S.C22.Rsp
command: "SetCredential"
timedInteractionTimeoutMs: 10000
arguments:
Expand All @@ -41,20 +89,39 @@ tests:
- name: "credentialData"
value: "123456"
- name: "userIndex"
value: null
value: 1
- name: "userStatus"
value: null
value: 0
- name: "userType"
value: null
value: 0
response:
values:
- name: "status"
value: 0
- name: "userIndex"
value: 1
value: null
- name: "nextCredentialIndex"
value: 2

- label: "Verify created PIN credential"
command: "GetCredentialStatus"
arguments:
values:
- name: "credential"
value: { CredentialType: 1, CredentialIndex: 1 }
response:
values:
- name: "credentialExists"
value: true
- name: "userIndex"
value: 1
- name: "creatorFabricIndex"
value: 1
- name: "lastModifiedFabricIndex"
value: 1
- name: "nextCredentialIndex"
value: null

- label: "Precondition: Door is in locked state"
PICS: DRLK.S.C00.Rsp
command: "LockDoor"
Expand All @@ -69,7 +136,7 @@ tests:
command: "writeAttribute"
attribute: "AutoRelockTime"
arguments:
value: 10
value: 60

- label: "TH sends the unlock Door command to the DUT with valid PINCode"
PICS: DRLK.S.C01.Rsp
Expand All @@ -80,13 +147,6 @@ tests:
- name: "PINCode"
value: "123456"

- label: "TH reads AutoRelockTime attribute from DUT"
PICS: DRLK.S.A0023
command: "readAttribute"
attribute: "AutoRelockTime"
response:
value: 10

- label: "Wait 10000ms"
cluster: "DelayCommands"
command: "WaitForMs"
Expand All @@ -100,7 +160,15 @@ tests:
command: "readAttribute"
attribute: "LockState"
response:
value: 1
value: 2

- label: "Cleanup the created user"
command: "ClearUser"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "userIndex"
value: 1

- label: "Clean the created credential"
PICS: DRLK.S.C26.Rsp
Expand Down
Loading

0 comments on commit 1485842

Please sign in to comment.