forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple YAML test for access control cluster
This is a very simple test for now. I will come back and add lots more. Towards issue project-chip#10253
- Loading branch information
1 parent
17dc4b0
commit cd249cc
Showing
5 changed files
with
1,353 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
# Copyright (c) 2022 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: Access Control Cluster Tests | ||
|
||
config: | ||
nodeId: 0x12344321 | ||
cluster: "Access Control" | ||
endpoint: 0 | ||
|
||
tests: | ||
- label: "Wait for commissionee" | ||
cluster: "DelayCommands" | ||
command: "WaitForCommissionee" | ||
arguments: | ||
values: | ||
- name: "nodeId" | ||
value: nodeId | ||
|
||
- label: "Write" | ||
command: "writeAttribute" | ||
attribute: "ACL" | ||
arguments: | ||
value: [ | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 5, # administer | ||
AuthMode: 2, # case | ||
Subjects: [nodeId, 1234, 5678, 9090], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 0, DeviceType: null}, | ||
{Cluster: 1, Endpoint: null, DeviceType: null}, | ||
{Cluster: 2, Endpoint: 3, DeviceType: null}, | ||
], | ||
}, | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 1, # view | ||
AuthMode: 2, # case | ||
Subjects: [1234, 5678, 0x8080, 0xFFFF], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 1, DeviceType: null}, | ||
{Cluster: 2, Endpoint: null, DeviceType: null}, | ||
{Cluster: 3, Endpoint: 4, DeviceType: null}, | ||
], | ||
}, | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 3, # operate | ||
AuthMode: 3, # group | ||
Subjects: [0x0101, 0x0102, 0xAAAA, 0xBBBB], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 2, DeviceType: null}, | ||
{Cluster: 3, Endpoint: null, DeviceType: null}, | ||
{Cluster: 4, Endpoint: 5, DeviceType: null}, | ||
], | ||
}, | ||
] | ||
|
||
- label: "Read" | ||
command: "readAttribute" | ||
attribute: "ACL" | ||
response: | ||
value: [ | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 5, # administer | ||
AuthMode: 2, # case | ||
Subjects: [nodeId, 1234, 5678, 9090], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 0, DeviceType: null}, | ||
{Cluster: 1, Endpoint: null, DeviceType: null}, | ||
{Cluster: 2, Endpoint: 3, DeviceType: null}, | ||
], | ||
}, | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 1, # view | ||
AuthMode: 2, # case | ||
Subjects: [1234, 5678, 0x8080, 0xFFFF], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 1, DeviceType: null}, | ||
{Cluster: 2, Endpoint: null, DeviceType: null}, | ||
{Cluster: 3, Endpoint: 4, DeviceType: null}, | ||
], | ||
}, | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 3, # operate | ||
AuthMode: 3, # group | ||
Subjects: [0x0101, 0x0102, 0xAAAA, 0xBBBB], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 2, DeviceType: null}, | ||
{Cluster: 3, Endpoint: null, DeviceType: null}, | ||
{Cluster: 4, Endpoint: 5, DeviceType: null}, | ||
], | ||
}, | ||
] | ||
|
||
- label: "Write" | ||
command: "writeAttribute" | ||
attribute: "ACL" | ||
arguments: | ||
value: [ | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 5, # administer | ||
AuthMode: 2, # case | ||
Subjects: [nodeId], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 0, DeviceType: null}, | ||
{Cluster: 1, Endpoint: null, DeviceType: null}, | ||
{Cluster: 2, Endpoint: 3, DeviceType: null}, | ||
], | ||
}, | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 1, # view | ||
AuthMode: 2, # case | ||
Subjects: [0xCCCC, 0xDDDD], | ||
Targets: [ | ||
{Cluster: 5, Endpoint: 6, DeviceType: null}, | ||
], | ||
}, | ||
] | ||
|
||
- label: "Read" | ||
command: "readAttribute" | ||
attribute: "ACL" | ||
response: | ||
value: [ | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 5, # administer | ||
AuthMode: 2, # case | ||
Subjects: [nodeId], | ||
Targets: [ | ||
{Cluster: null, Endpoint: 0, DeviceType: null}, | ||
{Cluster: 1, Endpoint: null, DeviceType: null}, | ||
{Cluster: 2, Endpoint: 3, DeviceType: null}, | ||
], | ||
}, | ||
{ | ||
FabricIndex: 1, | ||
Privilege: 1, # view | ||
AuthMode: 2, # case | ||
Subjects: [0xCCCC, 0xDDDD], | ||
Targets: [ | ||
{Cluster: 5, Endpoint: 6, DeviceType: null}, | ||
], | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.