aws-cloudformation / aws-cloudformation/cloudformation-cli
Contract test input consistency
- Lingua principale
- Python
- Stelle
- 336
- Fork
- 172
- Merge medio
- 3g 5m
- PR unite (30g)
- 3
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Leggi src/rpdk/core/contract/suite/handler_create.py intorno a test_read_success(), quindi confronta la relativa asserzione di uguaglianza con i casi contract_create_delete e contract_create_read_success descritti nell’issue. Determina se il modello di creazione originale sia richiesto intenzionalmente dopo una lettura che utilizza solo l’identificatore primario; il lavoro è completo quando la motivazione o il comportamento atteso del test sono documentati e privi di ambiguità.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, python
- Ambito
- testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100