The GenericApplicationTest.main tests fails. It returns the error:
org.opentest4j.AssertionFailedError:
Expected :false
Actual :true
The issue is problably that the wrong endpoint is verified:
void main() {
GenericApplication.main(new String[]{"--server.port=8082"});
RestAssured.port = 8082;
given()
.when()
.get("/internal/health")
.then()
.statusCode(SC_OK)
.body("status", equalTo("UP"));
Map<String, Object> info = given()
.accept(ContentType.JSON)
.when()
.get("/internal/info")
.as(new TypeRef<Map<String, Object>>() {
});
assertFalse(info.isEmpty());
}
The internal/info should be replaced by internal/health
The GenericApplicationTest.main tests fails. It returns the error:
The issue is problably that the wrong endpoint is verified:
The
internal/infoshould be replaced byinternal/health