blob: 985e943df5057f1a779b74fe398a6d29b45fd060 [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.
name: ICD Management Cluster Tests
config:
nodeId: 0x12344321
cluster: "ICD Management"
endpoint: 0
tests:
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label: "Read IdleModeInterval"
command: "readAttribute"
attribute: "IdleModeInterval"
response:
value: 500
- label: "Read ActiveModeInterval"
command: "readAttribute"
attribute: "ActiveModeInterval"
response:
value: 300
- label: "Read ActiveModeThreshold"
command: "readAttribute"
attribute: "ActiveModeThreshold"
response:
value: 300
- label: "Read ICDCounter"
command: "readAttribute"
attribute: "ICDCounter"
response:
value: 0
- label: "Read ClientsSupportedPerFabric"
command: "readAttribute"
attribute: "ClientsSupportedPerFabric"
response:
value: 2
- label: "Unregister 1.0"
command: "UnregisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 101
response:
error: NOT_FOUND
- label: "Unregister 2.0"
command: "UnregisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 102
response:
error: NOT_FOUND
- label: "Unregister 3.0"
command: "UnregisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 102
response:
error: NOT_FOUND
- label: "Read RegisteredClients"
command: "readAttribute"
attribute: "RegisteredClients"
response:
value: []
- label: "Register 1.0 (key too short)"
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 101
- name: "MonitoredSubject"
value: 1001
- name: "Key"
value: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e"
response:
error: CONSTRAINT_ERROR
- label: "Register 1.0 (key too long)"
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 101
- name: "MonitoredSubject"
value: 1001
- name: "Key"
value: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\xff"
response:
error: CONSTRAINT_ERROR
- label: "Register 1.1"
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 101
- name: "MonitoredSubject"
value: 1001
- name: "Key"
value: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
response:
values:
- name: "ICDCounter"
value: 0
- label: "Register 2.1"
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 201
- name: "MonitoredSubject"
value: 2001
- name: "Key"
value:
"\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
response:
values:
- name: "ICDCounter"
value: 0
- label: "Register 3.1"
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 301
- name: "MonitoredSubject"
value: 3001
- name: "Key"
value: "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
response:
error: RESOURCE_EXHAUSTED
- label: "Read RegisteredClients"
command: "readAttribute"
attribute: "RegisteredClients"
response:
value:
[
{
CheckInNodeID: 101,
MonitoredSubject: 1001,
Key: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
},
{
CheckInNodeID: 201,
MonitoredSubject: 2001,
Key:
"\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f",
},
]
- label: "Register 1.1"
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 101
- name: "MonitoredSubject"
value: 1002
- name: "Key"
value: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1"
response:
values:
- name: "ICDCounter"
value: 0
- label: "Read RegisteredClients"
command: "readAttribute"
attribute: "RegisteredClients"
response:
value:
[
{
CheckInNodeID: 101,
MonitoredSubject: 1002,
Key: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1",
},
{
CheckInNodeID: 201,
MonitoredSubject: 2001,
Key:
"\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f",
},
]
- label: "Register 2.2 (wrong verification key)"
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 201
- name: "MonitoredSubject"
value: 2002
- name: "Key"
value: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f"
- name: "VerificationKey"
value:
"\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2f\x2f"
response:
values:
- name: "ICDCounter"
value: 0
- label: "Read RegisteredClients"
command: "readAttribute"
attribute: "RegisteredClients"
response:
value:
[
{
CheckInNodeID: 101,
MonitoredSubject: 1002,
Key: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1",
},
{
CheckInNodeID: 201,
MonitoredSubject: 2002,
Key: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f",
},
]
- label: "Unregister 1.1 (wrong key)"
command: "UnregisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 101
- name: "Key"
value: "\x01\x21\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1"
- label: "Read RegisteredClients"
command: "readAttribute"
attribute: "RegisteredClients"
response:
value:
[
{
CheckInNodeID: 201,
MonitoredSubject: 2002,
Key: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f",
},
]
- label: "Unregister 2.1"
command: "UnregisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 201
- label: "Read RegisteredClients"
command: "readAttribute"
attribute: "RegisteredClients"
response:
value: []
- label: "Unregister 1.3"
command: "UnregisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 101
response:
error: NOT_FOUND
- label: "Unregister 2.2"
command: "UnregisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: 102
response:
error: NOT_FOUND