Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/src/main/resources/schema/workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
}
},
"required": [
"id",
"name",
"version",
"states"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void testIncompleteYamlWithSchemaValidation() {
List<ValidationError> validationErrors =
workflowValidator.setSource("---\n" + "key: abc\n").validate();
Assertions.assertNotNull(validationErrors);
Assertions.assertEquals(3, validationErrors.size());
Assertions.assertEquals(4, validationErrors.size());
}

@Test
Expand Down Expand Up @@ -119,11 +119,10 @@ public void testWorkflowMissingStatesIdAndKey() {
+ "}")
.validate();
Assertions.assertNotNull(validationErrors);
Assertions.assertEquals(2, validationErrors.size());
Assertions.assertEquals(1, validationErrors.size());

Assertions.assertEquals(
"Workflow id or key should not be empty", validationErrors.get(0).getMessage());
Assertions.assertEquals("No states found", validationErrors.get(1).getMessage());
"$.id: is missing but it is required", validationErrors.get(0).getMessage());
}

@Test
Expand Down