cloudformation-cli
cloudformation-cli copied to clipboard
Contract test input consistency
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.
- 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.
- For these tests, 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.
@shaneyuan18 Did you ever manage to sidestep this? I think it’s very similar to my problem here