Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using symbolic error names in YAML. #12340

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions src/app/tests/suites/TestCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tests:
- label: "Send Test Not Handled Command"
command: "testNotHandled"
response:
error: 0x85 # INVALID_COMMAND
error: INVALID_COMMAND

- label: "Send Test Specific Command"
command: "testSpecific"
Expand Down Expand Up @@ -56,7 +56,7 @@ tests:
- name: "arg2"
value: 6
response:
error: 0x85 # INVALID_COMMAND
error: INVALID_COMMAND

# Tests for Boolean attribute

Expand Down Expand Up @@ -624,7 +624,7 @@ tests:
arguments:
value: "TestValueLongerThan10"
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute OCTET_STRING"
command: "readAttribute"
Expand Down Expand Up @@ -690,7 +690,7 @@ tests:
arguments:
value: "☉TestValueLongerThan10☉"
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute CHAR_STRING"
command: "readAttribute"
Expand Down Expand Up @@ -816,15 +816,15 @@ tests:
response:
# No such endpoint, so expect an error.
# SDK returning wrong error code here so far.
errorWrongValue: 0x7F # UNSUPPORTED_ENDPOINT
errorWrongValue: UNSUPPORTED_ENDPOINT

- label: "Send Test Command to unsupported cluster"
command: "test"
endpoint: 0
response:
# No TestCluster on that, so expect an error.
# SDK returning wrong error code here so far.
errorWrongValue: 0xC3 # UNSUPPORTED_CLUSTER
errorWrongValue: UNSUPPORTED_CLUSTER

# Tests for vendor id

Expand Down Expand Up @@ -1480,7 +1480,7 @@ tests:
arguments:
value: 255
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_BITMAP8 unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1520,7 +1520,7 @@ tests:
arguments:
value: 65535
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_BITMAP16 unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1560,7 +1560,7 @@ tests:
arguments:
value: 4294967295
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_BITMAP32 unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1600,7 +1600,7 @@ tests:
arguments:
value: "18446744073709551615"
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_BITMAP64 unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1640,7 +1640,7 @@ tests:
arguments:
value: 255
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT8U unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1680,7 +1680,7 @@ tests:
arguments:
value: 65535
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT16U unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1720,7 +1720,7 @@ tests:
arguments:
value: 4294967295
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT32U unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1760,7 +1760,7 @@ tests:
arguments:
value: "18446744073709551615"
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT64U unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1800,7 +1800,7 @@ tests:
arguments:
value: -128
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT8S unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1840,7 +1840,7 @@ tests:
arguments:
value: -32768
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT16S unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1880,7 +1880,7 @@ tests:
arguments:
value: -2147483648
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT32S unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1923,7 +1923,7 @@ tests:
# work around that.
value: "-9223372036854775807LL - 1"
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_INT64S unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -1963,7 +1963,7 @@ tests:
arguments:
value: 255
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_ENUM8 unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -2003,7 +2003,7 @@ tests:
arguments:
value: 65535
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR

- label: "Read attribute NULLABLE_ENUM16 unchanged Value"
command: "readAttribute"
Expand Down Expand Up @@ -2118,12 +2118,12 @@ tests:
attribute: "list_int8u"
response:
# SDK returning wrong error code here so far.
errorWrongValue: 0x7F # UNSUPPORTED_ENDPOINT
errorWrongValue: UNSUPPORTED_ENDPOINT

- label: "Read attribute from nonexistent cluster."
endpoint: 0
command: "readAttribute"
attribute: "list_int8u"
response:
# SDK returning wrong error code here so far.
errorWrongValue: 0xC3 # UNSUPPORTED_CLUSTER
errorWrongValue: UNSUPPORTED_CLUSTER
2 changes: 0 additions & 2 deletions src/app/tests/suites/TestGroupsCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ tests:

- label: "Remove All"
command: "RemoveAllGroups"
response:
error: 0x00

- label: "View Group 1 (removed)"
command: "ViewGroup"
Expand Down
4 changes: 1 addition & 3 deletions src/app/tests/suites/TestModeSelectCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ tests:
values:
- name: "NewMode"
value: 4
response:
error: 0

- label: "Verify Current Mode Change"
command: "readAttribute"
Expand All @@ -80,4 +78,4 @@ tests:
- name: "NewMode"
value: 2
response:
error: 0x87 # CONSTRAINT_ERROR
error: CONSTRAINT_ERROR
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_BI_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tests:
arguments:
value: 1
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "reads back global attribute: ClusterRevision"
command: "readAttribute"
Expand Down
6 changes: 3 additions & 3 deletions src/app/tests/suites/certification/Test_TC_BI_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ tests:
arguments:
value: 0
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "Reads back the mandatory non-global attribute: StatusFlags"
command: "readAttribute"
Expand Down Expand Up @@ -214,7 +214,7 @@ tests:
arguments:
value: 0
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "Reads back the optional non-global attribute: Polarity"
disabled: true
Expand Down Expand Up @@ -273,7 +273,7 @@ tests:
arguments:
value: 0
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "Reads back the optional non-global attribute: ApplicationType"
disabled: true
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tests:
arguments:
value: 1
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "reads back global attribute: ClusterRevision"
command: "readAttribute"
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tests:
arguments:
value: 1
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "Reads back the mandatory non-global attribute: StateValue"
command: "readAttribute"
Expand Down
4 changes: 2 additions & 2 deletions src/app/tests/suites/certification/Test_TC_CC_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tests:
arguments:
value: 4
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "reads back global attribute: ClusterRevision"
disabled: true
Expand All @@ -57,7 +57,7 @@ tests:
arguments:
value: 0
response:
error: 0x88 # UNSUPPORTED_WRITE
error: UNSUPPORTED_WRITE

- label: "reads back optional global attribute: FeatureMap"
disabled: true
Expand Down
Loading