Skip to content

Commit

Permalink
MP OpenAPI: Add test for validation message output
Browse files Browse the repository at this point in the history
We were testing for each of the problem messages we expect, but we
weren't testing for the top message which says "The following errors
were found:"
  • Loading branch information
Azquelt committed Sep 20, 2024
1 parent ffa9d72 commit 5ad610d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public static void setUpTest() throws Exception {
assertNotNull("The application openapi_validation was processed and an OpenAPI document was produced.",
server.waitForStringInLog("CWWKO1660I.*and an OpenAPI document was produced.")); // wait for application to
// be processed
assertThat("Validation errors were reported", server.findStringsInLogs("CWWKO1650E"), not(empty()));
assertThat("Validation warnings were reported", server.findStringsInLogs("CWWKO1651W"), not(empty()));
String openApiDoc = new HttpRequest(server, "/openapi").run(String.class);
Log.info(OpenAPIValidationTestOne.class, "setUpTest", "OpenAPI doc:\n" + openApiDoc);
}
Expand Down

0 comments on commit 5ad610d

Please sign in to comment.