blob: 9220ee7158dc5168664c683420ad9ef4e92b6f11 [file] [log] [blame]
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default
name: 19.1.1. [TC-SC-5.1] Adding member to a group
PICS:
- PICS_MCORE_ROLE_COMMISSIONEE
config:
nodeId: 0x12344321
cluster: "Groups"
# Users should set endpoint value on the command line to PIXIT.G.ENDPOINT
endpoint: 1
tests:
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label: "TH adds ACL Operate privileges for Group 0x0103"
cluster: "Access Control"
endpoint: 0
command: "writeAttribute"
attribute: "ACL"
arguments:
value:
[
{
FabricIndex: 1,
Privilege: 5,
AuthMode: 2,
Subjects: [commissionerNodeId],
Targets: null,
},
{
FabricIndex: 1,
Privilege: 3,
AuthMode: 3,
Subjects: [0x0103],
Targets: null,
},
]
- label: "TH sends KeySetWrite command with incorrect key"
cluster: "Group Key Management"
endpoint: 0
command: "KeySetWrite"
arguments:
values:
- name: GroupKeySet
value:
{
GroupKeySetID: 0x01a3,
GroupKeySecurityPolicy: 0,
EpochKey0: "0x00000000000000000000000000000001",
EpochStartTime0: 111,
EpochKey1: "0x00000000000000000000000000000002",
EpochStartTime1: 222,
EpochKey2: "0x00000000000000000000000000000003",
EpochStartTime2: 333,
}
- label: "TH sends KeySetWrite command with TH key"
cluster: "Group Key Management"
endpoint: 0
command: "KeySetWrite"
arguments:
values:
- name: GroupKeySet
value:
{
GroupKeySetID: 0x01a3,
GroupKeySecurityPolicy: 0,
EpochKey0: "0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime0: 2220000,
EpochKey1: "0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime1: 2220001,
EpochKey2: "0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime2: 2220002,
}
- label: "TH binds GroupId to GroupKeySet"
cluster: "Group Key Management"
endpoint: 0
command: "writeAttribute"
attribute: "GroupKeyMap"
arguments:
value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }]
- label: "TH sends RemoveAllGroups command"
command: "RemoveAllGroups"
- label: "TH sends AddGroup command"
command: "AddGroup"
arguments:
values:
- name: GroupID
value: 0x0103
- name: GroupName
value: "Test Group"
- label: "TH sends ViewGroup command"
PICS: G.S.F00
command: "ViewGroup"
arguments:
values:
- name: GroupID
value: 0x0103
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0103
- name: GroupName
value: "Test Group"
- label: "TH sends ViewGroup command"
PICS: "!(G.S.F00)"
command: "ViewGroup"
arguments:
values:
- name: GroupID
value: 0x0103
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0103
- name: GroupName
value: ""
- label: "TH sends KeySetRead"
cluster: "Group Key Management"
endpoint: 0
command: "KeySetRead"
arguments:
values:
- name: GroupKeySetID
value: 0x01a3
response:
values:
- name: GroupKeySet
value:
{
GroupKeySetID: 0x01a3,
GroupKeySecurityPolicy: 0,
EpochKey0: null,
EpochStartTime0: 2220000,
EpochKey1: null,
EpochStartTime1: 2220001,
EpochKey2: null,
EpochStartTime2: 2220002,
}
- label: "TH reads GroupTable attribute"
cluster: "Group Key Management"
endpoint: 0
PICS: G.S.F00
command: "readAttribute"
attribute: "GroupTable"
response:
value:
[
{
GroupId: 0x0103,
Endpoints: [endpoint],
GroupName: "Test Group",
},
]
- label: "TH reads GroupTable attribute"
cluster: "Group Key Management"
endpoint: 0
PICS: "!(G.S.F00)"
command: "readAttribute"
attribute: "GroupTable"
response:
value: [{ GroupId: 0x0103, Endpoints: [endpoint], GroupName: "" }]
- label: "TH removes the GroupKeySet"
cluster: "Group Key Management"
endpoint: 0
command: "KeySetRemove"
arguments:
values:
- name: GroupKeySetID
value: 0x01a3
- label: "TH verifies the corresponding GroupKeyMap entry has been removed"
cluster: "Group Key Management"
endpoint: 0
command: "readAttribute"
attribute: "GroupKeyMap"
response:
value: []
- label: "TH cleans up groups using RemoveAllGroups command"
command: "RemoveAllGroups"
- label: "TH verifies the group has been removed in the GroupTable"
cluster: "Group Key Management"
endpoint: 0
command: "readAttribute"
attribute: "GroupTable"
response:
value: []
- label: "TH removes ACL Operate privileges for Group 0x0103"
cluster: "Access Control"
endpoint: 0
command: "writeAttribute"
attribute: "ACL"
arguments:
value:
[
{
FabricIndex: 1,
Privilege: 5,
AuthMode: 2,
Subjects: [commissionerNodeId],
Targets: null,
},
]