Skip to content

Commit

Permalink
Add logs when validation fails in YAML parser (#29890)
Browse files Browse the repository at this point in the history
* Add log when validation fails in YAML parser

* Changes after code review
  • Loading branch information
rquidute committed Oct 27, 2023
1 parent 30b58b2 commit 02e7647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/py_matter_yamltests/matter_yamltests/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ def _response_values_source_validation(self, expected_response, received_respons
def _response_values_validation(self, expected_response, received_response, result):
check_type = PostProcessCheckType.RESPONSE_VALIDATION
error_success = 'The test expectation "{name} == {value}" is true'
error_failure = 'The test expectation "{name} == {value}" is false'
error_failure = 'The test expectation "{name} ({actual}) == {value}" is false'
error_name_does_not_exist = 'The test expects a value named "{name}" but it does not exists in the response."'
error_value_does_not_exist = 'The test expects a value but it does not exists in the response."'

Expand Down Expand Up @@ -953,7 +953,7 @@ def _response_values_validation(self, expected_response, received_response, resu
name=expected_name, value=expected_value))
else:
result.error(check_type, error_failure.format(
name=expected_name, value=expected_value))
name=expected_name, actual=received_value, value=expected_value))

def _response_value_validation(self, expected_value, received_value):
if isinstance(expected_value, list):
Expand Down

0 comments on commit 02e7647

Please sign in to comment.