Skip to content

Commit

Permalink
Fix health schema type tests
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar committed Oct 25, 2024
1 parent 8beb866 commit 1d2765d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ void testOpenApiPathAccessResource() {
.body("components.schemas.HealthCheck.type", Matchers.equalTo("object"))
.body("components.schemas.HealthCheck.properties.status.type", Matchers.equalTo("string"))
.body("components.schemas.HealthCheck.properties.name.type", Matchers.equalTo("string"))
.body("components.schemas.HealthCheck.properties.data.type", Matchers.equalTo("object"))
.body("components.schemas.HealthCheck.properties.data.nullable", Matchers.is(true));

.body("components.schemas.HealthCheck.properties.data.type", Matchers.contains("object", "null"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void testOpenApiPathAccessResource() {
.when().get(OPEN_API_PATH)
.then()
.header("Content-Type", "application/json;charset=UTF-8")

.body("paths", Matchers.hasKey("/q/health/ready"))
.body("paths", Matchers.hasKey("/q/health/live"))
.body("paths", Matchers.hasKey("/q/health/started"))
Expand All @@ -40,7 +41,7 @@ void testOpenApiPathAccessResource() {
.body("components.schemas.HealthCheck.type", Matchers.equalTo("object"))
.body("components.schemas.HealthCheck.properties.status.type", Matchers.equalTo("string"))
.body("components.schemas.HealthCheck.properties.name.type", Matchers.equalTo("string"))
.body("components.schemas.HealthCheck.properties.data.type", Matchers.arrayContaining("object", "null"));
.body("components.schemas.HealthCheck.properties.data.type", Matchers.contains("object", "null"));
}

}

0 comments on commit 1d2765d

Please sign in to comment.