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

adjusted summary report #553

Merged

Conversation

ammokhov
Copy link
Contributor

Issue #, if available:

Description of changes:

added messages to all assertions so it will be clear why certain test failed;
removed the full stack trace to a short option as it outputs the assertion message and method it comes from;

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

src/rpdk/core/contract/resource_client.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/contract_asserts.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_commons.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_delete.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_delete.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_delete.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_update.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_update_invalid.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_update_invalid.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/resource_client.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/resource_client.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/contract_asserts.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_update.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_update.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/suite/handler_update.py Outdated Show resolved Hide resolved
src/rpdk/core/data/pytest-contract.ini Show resolved Hide resolved
src/rpdk/core/contract/resource_client.py Outdated Show resolved Hide resolved
src/rpdk/core/contract/resource_client.py Outdated Show resolved Hide resolved
@ammokhov ammokhov force-pushed the contract-test-output-adjustments branch 6 times, most recently from dcb906d to c60b57e Compare August 28, 2020 04:02
@ammokhov ammokhov force-pushed the contract-test-output-adjustments branch from c60b57e to 3ab0974 Compare August 28, 2020 04:06
@ammokhov ammokhov merged commit 49dca0b into aws-cloudformation:master Aug 28, 2020
@ammokhov ammokhov deleted the contract-test-output-adjustments branch August 28, 2020 17:38
Comment on lines +87 to +91
assert (
response["resourceModel"] == current_resource_model
), "All properties specified in the request MUST be present in the model \
returned, and they MUST match exactly, with the exception of properties\
defined as writeOnlyProperties in the resource schema"
Copy link
Contributor

@PatMyron PatMyron Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this error message might be misleading because there should be more exceptions:
readOnlyProperties, writeOnlyProperties, conditionallyReadOnlyProperties, defaults, insertionOrder, uniqueItems, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this been taken from the handler contract agreement

Comment on lines 98 to +103
assert response["resourceModel"] == {
**current_resource_model,
**update_resource_model,
}
}, "All properties specified in the update request MUST be present in the \
model returned, and they MUST match exactly, with the exception of \
properties defined as writeOnlyProperties in the resource schema"
Copy link
Contributor

@PatMyron PatMyron Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this error message might be misleading because there should be more exceptions:
readOnlyProperties, writeOnlyProperties, conditionallyReadOnlyProperties, defaults, insertionOrder, uniqueItems, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants