1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Hello! This Fine-grained assertions section (at the bottom of that section there is a Step Function example) may be of help that makes use of the assertions module. In particular for Step Function definitions, the Match.serializedJson() matcher might be useful. In theory that could help you assert your Tasks are transitioning or chaining as expected.
Another approach using the Matching lib could be something like the following (Typescript snippet example)
...
it('Get Current Weather should transition to "Is it Hot?", () => {
const GET_WEATHER= 'Get Current Weather'
const IS_IT_HOT = "Is it Hot?"
template.hasResourceProperties('AWS::StepFunctions::StateMachine', {
DefinitionString: {
'Fn::Join': [
'',
Match.arrayWith([
Match.stringLikeRegexp(
`("${GET_WEATHER}":{"Next":"${IS_IT_HOT}").*`,
),
]),
],
},
});
});
...
Hope this gives you some ideas!
con risposta 13 giorni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa