-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathTest_TC_G_2_4.yaml
300 lines (278 loc) · 9.43 KB
/
Test_TC_G_2_4.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# Copyright (c) 2023 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.
name:
131.2.4. [TC-G-2.4] Commands - AddGroup Command with same GroupID on
Multiple Endpoint [DUT-Server]
PICS:
- G.S
- MCORE.G.MULTIENDPOINT
config:
nodeId: 0x12344321
cluster: "Groups"
endpoint: 0
# Users should set endpoint value on the command line to PIXIT.G.ENDPOINT1
Groups.Endpoint1: 1
# Users should set endpoint value on the command line to PIXIT.G.ENDPOINT2
Groups.Endpoint2: 2
tests:
- label:
"Step 1: Commission DUT to TH (can be skipped if done in a preceding
test)."
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label:
"Step 1: Verify that PIXIT.G.ENDPOINT and PIXIT.G.ENDPOINT2 are
different."
cluster: "EqualityCommands"
command: "UnsignedNumberEquals"
arguments:
values:
- name: "Value1"
value: Groups.Endpoint1
- name: "Value2"
value: Groups.Endpoint2
response:
- values:
- name: "Equals"
value: false
- label:
"Step 2: TH sends KeySetWrite command in the GroupKeyManagement
cluster to DUT on EP0 using a key that is pre-installed on the TH.
GroupKeySet fields are as follows: 1)GroupKeySetID: 1
2)GroupKeySecurityPolicy: TrustFirst (0) 3)EpochKey0:
d0d1d2d3d4d5d6d7d8d9dadbdcdddedf 4)EpochStartTime0: 1 5)EpochKey1:
d1d1d2d3d4d5d6d7d8d9dadbdcdddedf 6)EpochStartTime1:
18446744073709551613 7)EpochKey2: d2d1d2d3d4d5d6d7d8d9dadbdcdddedf
8)EpochStartTime2: 18446744073709551614"
PICS: GRPKEY.S.C00.Rsp
cluster: "Group Key Management"
command: "KeySetWrite"
arguments:
values:
- name: GroupKeySet
value:
{
GroupKeySetID: 1,
GroupKeySecurityPolicy: 0,
EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime0: 1,
EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime1: 18446744073709551613,
EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime2: 18446744073709551614,
}
- label:
"Step 3: TH writes the GroupKeyMap attribute in the GroupKeyManagement
cluster on EP0 with one entry binding GroupId(0x0001) with
GroupKeySetID 1"
PICS: GRPKEY.S.A0000
cluster: "Group Key Management"
command: "writeAttribute"
attribute: "GroupKeyMap"
arguments:
value: [{ FabricIndex: 1, GroupId: 0x0001, GroupKeySetID: 1 }]
- label:
"Step 4a: TH cleans up the groups by sending the RemoveAllGroups
command to the DUT on PIXIT.G.ENDPOINT1"
endpoint: Groups.Endpoint1
command: "RemoveAllGroups"
- label:
"Step 4b: TH cleans up the groups by sending the RemoveAllGroups
command to the DUT on PIXIT.G.ENDPOINT2"
endpoint: Groups.Endpoint2
command: "RemoveAllGroups"
- label:
"Step 5a: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT with
the following fields:1) GroupID as 0x0001, 2)GroupName as 'Gp1'"
PICS: G.S.C00.Rsp && G.S.C00.Tx
endpoint: Groups.Endpoint1
command: "AddGroup"
arguments:
values:
- name: GroupID
value: 0x0001
- name: GroupName
value: "Gp1"
response:
values:
- name: "Status"
value: 0x00
- name: "GroupID"
value: 0x0001
- label:
"Step 5b: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT2 with
the following fields: GroupID as 0x0001,GroupName as 'Gp2'"
PICS: G.S.C00.Rsp && G.S.C00.Tx
endpoint: Groups.Endpoint2
command: "AddGroup"
arguments:
values:
- name: GroupID
value: 0x0001
- name: GroupName
value: "Gp2"
response:
values:
- name: "Status"
value: 0x00
- name: "GroupID"
value: 0x0001
- label:
"Step 6: TH reads GroupTable attribute from the GroupKeyManagement
cluster from DUT on EP0"
PICS: GRPKEY.S.A0001
cluster: "Group Key Management"
command: "readAttribute"
attribute: "GroupTable"
response:
value:
[
{
FabricIndex: 1,
GroupId: 0x0001,
Endpoints: [Groups.Endpoint1, Groups.Endpoint2],
},
]
- label:
"Step 7: TH reads GroupTable attribute from the GroupKeyManagement
cluster from DUT on EP0, Verify that the GroupTable contains an entry
with the GroupName as 'Gp2'"
PICS: GRPKEY.S.A0001 && G.S.F00
cluster: "Group Key Management"
command: "readAttribute"
attribute: "GroupTable"
response:
value:
[
{
FabricIndex: 1,
GroupId: 0x0001,
Endpoints: [Groups.Endpoint1, Groups.Endpoint2],
GroupName: "Gp2",
},
]
- label:
"Step 8: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT with
the following fields: GroupID as 0x0001"
PICS: G.S.C01.Rsp && G.S.C01.Tx
endpoint: Groups.Endpoint1
command: "ViewGroup"
arguments:
values:
- name: GroupID
value: 0x0001
response:
values:
- name: Status
value: 0x00
- name: GroupID
value: 0x0001
- label:
"Step 9: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT with
the following fields: GroupID as 0x0001. Verify that the
ViewGroupResponse contains GroupName as 'GP2'"
PICS: G.S.C01.Rsp && G.S.C01.Tx && G.S.F00
endpoint: Groups.Endpoint1
command: "ViewGroup"
arguments:
values:
- name: GroupID
value: 0x0001
response:
values:
- name: Status
value: 0x00
- name: GroupID
value: 0x0001
- name: GroupName
value: "Gp2"
- label:
"Step 10: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT as
unicast with the following field: GroupID as 0x0001"
PICS: G.S.C03.Rsp && G.S.C03.Tx
endpoint: Groups.Endpoint1
command: "RemoveGroup"
arguments:
values:
- name: "GroupID"
value: 0x0001
response:
values:
- name: "Status"
value: 0x00
- name: "GroupID"
value: 0x0001
- label:
"Step 11: TH reads GroupTable attribute from the GroupKeyManagement
cluster from DUT on EP0"
PICS: GRPKEY.S.A0001 && !G.S.F00
cluster: "Group Key Management"
command: "readAttribute"
attribute: "GroupTable"
response:
value:
[
{
FabricIndex: 1,
GroupId: 0x0001,
Endpoints: [Groups.Endpoint2],
GroupName: "",
},
]
- label:
"Step 11: TH reads GroupTable attribute from the GroupKeyManagement
cluster from DUT on EP0"
PICS: GRPKEY.S.A0001 && G.S.F00
cluster: "Group Key Management"
command: "readAttribute"
attribute: "GroupTable"
response:
value:
[
{
FabricIndex: 1,
GroupId: 0x0001,
Endpoints: [Groups.Endpoint2],
GroupName: "Gp2",
},
]
- label:
"Step 12: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT2 as
unicast with the following field: GroupID as 0x0001"
PICS: G.S.C03.Rsp && G.S.C03.Tx
endpoint: Groups.Endpoint2
command: "RemoveGroup"
arguments:
values:
- name: "GroupID"
value: 0x0001
response:
values:
- name: "Status"
value: 0x00
- name: "GroupID"
value: 0x0001
- label:
"Step 13: TH reads GroupTable attribute from the GroupKeyManagement
cluster from DUT on EP0"
PICS: GRPKEY.S.A0001
cluster: "Group Key Management"
command: "readAttribute"
attribute: "GroupTable"
response:
value: []