Skip to content

Commit

Permalink
Add TestModeSelectCluster.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dinglamazon committed Oct 22, 2021
1 parent 7cac95e commit 1031687
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 23 deletions.
1 change: 1 addition & 0 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ function getTests()
'TestLogCommands',
'TestDescriptorCluster',
'TestOperationalCredentialsCluster',
'TestModeSelectCluster',
];

const Subscriptions = [
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/TestDescriptorCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tests:
command: "readAttribute"
attribute: "Server List"
response:
value: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
value: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
# CLUSTER_ID value is dummy 0 since yaml compares only the length of the List.
# right now

Expand Down
54 changes: 54 additions & 0 deletions src/app/tests/suites/TestModeSelectCluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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: Mode Select Cluster Tests

config:
cluster: "Mode Select Cluster"
endpoint: 0

tests:
- label: "Read CurrentMode"
command: "readAttribute"
attribute: "CurrentMode"
response:
value: 0

- label: "Read OnMode"
command: "readAttribute"
attribute: "OnMode"
response:
value: 0

- label: "Read StartUpMode"
command: "readAttribute"
attribute: "StartUpMode"
response:
value: 0

- label: "Read Description"
command: "readAttribute"
attribute: "Description"
response:
value: "Coffee"


- label: "Read SupportedModes"
command: "readAttribute"
attribute: "SupportedModes"
response:
constraints:
- type: list
- minLength: 3
- maxLength: 3
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function getTests()
'TestDelayCommands',
'TestDescriptorCluster',
'TestOperationalCredentialsCluster',
'TestModeSelectCluster',
];

const Subscriptions = [
Expand Down
107 changes: 106 additions & 1 deletion src/darwin/Framework/CHIPTests/CHIPClustersTests.m

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

Loading

0 comments on commit 1031687

Please sign in to comment.