diff --git a/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py b/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py index 69eecf2e03..00fdcf4ba6 100644 --- a/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py +++ b/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py @@ -454,6 +454,44 @@ def rule(): ), ], ), + ( + "Invalid string definition", + """ + { + "States": { + "NoType": {} + } + } + """, + [ + ValidationError( + "'Type' is a required property at 'States/NoType'", + rule=StateMachineDefinition(), + validator="required", + schema_path=deque( + [ + "properties", + "States", + "patternProperties", + "^.{1,128}$", + "required", + ] + ), + path=deque(["States", "NoType"]), + ), + ValidationError( + "'StartAt' is a required property", + rule=StateMachineDefinition(), + validator="required", + schema_path=deque( + [ + "required", + ] + ), + path=deque([]), + ), + ], + ), ], ) def test_validate(