-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add src/app/tests/suites/Test_AddNewFabricFromExistingFabric.yaml tes…
…t working with the chip-tool python yaml runner
- Loading branch information
1 parent
90eef21
commit 8998b75
Showing
2 changed files
with
150 additions
and
1 deletion.
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
147 changes: 147 additions & 0 deletions
147
src/app/tests/suites/Test_AddNewFabricFromExistingFabric.yaml
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,147 @@ | ||
# 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: Test | ||
|
||
config: | ||
nodeId: 0x12344321 | ||
endpoint: 0 | ||
|
||
tests: | ||
- label: "Wait for the alpha device to be retrieved " | ||
cluster: "DelayCommands" | ||
command: "WaitForCommissionee" | ||
arguments: | ||
values: | ||
- name: "nodeId" | ||
value: nodeId | ||
|
||
- label: "Read the fabrics list from alpha" | ||
command: "readAttribute" | ||
cluster: "Operational Credentials" | ||
attribute: "Fabrics" | ||
response: | ||
value: [{ Label: "", NodeID: nodeId }] | ||
constraints: | ||
type: list | ||
|
||
- label: | ||
"Send ArmFailSafe command to target device with ExpiryLengthSeconds 60 | ||
seconds" | ||
cluster: "General Commissioning" | ||
command: "ArmFailSafe" | ||
arguments: | ||
values: | ||
- name: "ExpiryLengthSeconds" | ||
value: 60 | ||
- name: "Breadcrumb" | ||
value: 0 | ||
|
||
- label: "Send CSRRequest command from alpha" | ||
command: "CSRRequest" | ||
cluster: "Operational Credentials" | ||
arguments: | ||
values: | ||
- name: CSRNonce | ||
value: "\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07" | ||
response: | ||
values: | ||
- name: "NOCSRElements" | ||
saveAs: NOCSRElements | ||
- name: "AttestationSignature" | ||
saveAs: attestationSignature | ||
|
||
- label: "Read the commissioner root certificate from the beta fabric" | ||
identity: "beta" | ||
cluster: "CommissionerCommands" | ||
command: "GetCommissionerRootCertificate" | ||
response: | ||
values: | ||
- name: "RCAC" | ||
saveAs: rcac | ||
|
||
- label: | ||
"Create a NOC chain for commissioner beta with the results of the | ||
CSRRequest from alpha" | ||
identity: "beta" | ||
cluster: "CommissionerCommands" | ||
command: "IssueNocChain" | ||
arguments: | ||
values: | ||
- name: "Elements" | ||
value: NOCSRElements | ||
- name: "nodeId" | ||
value: 0x43211234 | ||
response: | ||
values: | ||
- name: "NOC" | ||
saveAs: noc | ||
- name: "ICAC" | ||
saveAs: icac | ||
- name: "IPK" | ||
saveAs: ipk | ||
|
||
- label: "Send AddTrustedRootCertificate command from alpha" | ||
command: "AddTrustedRootCertificate" | ||
cluster: "Operational Credentials" | ||
arguments: | ||
values: | ||
- name: "RootCACertificate" | ||
value: rcac | ||
|
||
- label: "Send AddNOC command from alpha" | ||
command: "AddNOC" | ||
cluster: "Operational Credentials" | ||
arguments: | ||
values: | ||
- name: "NOCValue" | ||
value: noc | ||
- name: "ICACValue" | ||
value: icac | ||
- name: "IPKValue" | ||
value: ipk | ||
- name: "CaseAdminSubject" | ||
value: 0x000000000001B669 | ||
- name: "AdminVendorId" | ||
value: 0xFFF1 | ||
response: | ||
values: | ||
- name: "StatusCode" | ||
value: 0 | ||
|
||
- label: "Send Commissioning Complete command from beta" | ||
nodeId: 0x43211234 | ||
identity: "beta" | ||
cluster: "General Commissioning" | ||
command: "CommissioningComplete" | ||
|
||
- label: "Read the fabrics list again from alpha" | ||
command: "readAttribute" | ||
cluster: "Operational Credentials" | ||
attribute: "Fabrics" | ||
response: | ||
value: [{ Label: "", NodeID: nodeId }] | ||
constraints: | ||
type: list | ||
|
||
- label: "Read the fabrics list from beta this time" | ||
identity: "beta" | ||
nodeId: 0x43211234 | ||
command: "readAttribute" | ||
cluster: "Operational Credentials" | ||
attribute: "Fabrics" | ||
response: | ||
value: [{ Label: "", NodeID: 0x43211234 }] | ||
constraints: | ||
type: list |