1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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!
respondido hace 15 días
Contenido relevante
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace 6 meses
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 2 años