aws-cloudformation / aws-cloudformation/cloudformation-cli

Contract test input consistency

Open
#655 1 comment 1 reaction 0 assignees View on GitHub
contract tests
Dominant language
Python
Stars
336
Forks
172
Avg merge
3d 5m
Merged PRs (30d)
3

Description

Hi,

This is a general question on contract tests like contract_create_delete and contract_create_read_success. For these tests, one of the expectation is that the input Resource Model matches the output.

1. Curious why this is a requirement. I understand that for Read Handler we need to set the model with properties that get output for (Ref and Fn::GetAtt). However, for Create handler, I don't quite understand why we want to preserve all input states as they seem to have no value for clients.
2. For these [tests](https://github.com/aws-cloudformation/cloudformation-cli/blob/fa89c192184e6e6850d38865d5012ba41258f7c0/src/rpdk/core/contract/suite/handler_create.py#L82), with test read success(). Is there a reason that we are testing equality on the original create model? When creating cloudformation stacks, the read handler is only called with primaryIdentifier and have no knowledge of the original model.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.