Skip to content

Commit

Permalink
[TC-SC-5.2] Update the test to really check if the group message has …
Browse files Browse the repository at this point in the history
…been received (#25051)

* [TC-SC-5.2] Update the test to really check if the group message has been received

* Update generated tests code
  • Loading branch information
vivien-apple authored Feb 16, 2023
1 parent e744367 commit b8eee57
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 532 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"disable": [
"TestClientMonitoringCluster",
"Test_TC_SC_4_2",
"Test_TC_SC_5_2",
"TestClusterComplexTypes",
"TestEvents",
"TestDiscovery",
Expand Down
57 changes: 43 additions & 14 deletions src/app/tests/suites/certification/Test_TC_SC_5_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ tests:
{
GroupKeySetID: 0x01a3,
GroupKeySecurityPolicy: 0,
EpochKey0: "0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime0: 2220000,
EpochKey1: "0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime1: 2220001,
EpochKey2: "0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime2: 2220002,
}

Expand All @@ -90,7 +90,11 @@ tests:
command: "writeAttribute"
attribute: "GroupKeyMap"
arguments:
value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }]
value:
[
{ FabricIndex: 1, GroupId: 0x0101, GroupKeySetID: 0x01a3 },
{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 },
]

- label: "TH sends RemoveAllGroups command"
command: "RemoveAllGroups"
Expand All @@ -102,39 +106,64 @@ tests:
- name: GroupID
value: 0x0103
- name: GroupName
value: "Test Group"
value: "Test Group 0103"
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0103

- label:
"TH sends AddGroup command again but using group messaging (0x0103)"
groupId: 0x0103
command: "AddGroup"
arguments:
values:
- name: GroupID
value: 0x0101
- name: GroupName
value: "Test Group 0101"

# Give the group AddGroup time to actually happen; unicast delivery can outrace
# multicast if the unicast packet is sent immediately after the multicast one.
- label: "Wait for AddGroup"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 1000

- label: "TH sends ViewGroup command using group messaging"
- label: "TH sends ViewGroup command"
PICS: G.S.F00
command: "ViewGroup"
groupId: 0x0103
arguments:
values:
- name: GroupID
value: 0x0103
value: 0x0101
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0103
value: 0x0101
- name: GroupName
value: "Test Group"
value: "Test Group 0101"

- label: "TH sends ViewGroup command using group messaging"
- label: "TH sends ViewGroup command"
PICS: "!(G.S.F00)"
command: "ViewGroup"
groupId: 0x0103
arguments:
values:
- name: GroupID
value: 0x0103
value: 0x0101
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0103
value: 0x0101
- name: GroupName
value: ""

Expand Down
100 changes: 72 additions & 28 deletions zzz_generated/chip-tool/zap-generated/test/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b8eee57

Please sign in to comment.