Skip to content

GenericApplicationTest unit test fails #52

Description

@maarten-kieft

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions