Polish AbstractHealthEndpointAdditionalPathIntegrationTests

See gh-29593
pull/30003/head
izeye 3 years ago committed by Stephane Nicoll
parent 0597c6831e
commit 118eb5f74a

@ -20,7 +20,6 @@ import java.util.function.Consumer;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener;
import org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider; import org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider;
import org.springframework.boot.test.context.runner.AbstractApplicationContextRunner; import org.springframework.boot.test.context.runner.AbstractApplicationContextRunner;
import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ContextConsumer;
@ -75,7 +74,6 @@ abstract class AbstractHealthEndpointAdditionalPathIntegrationTests<T extends Ab
this.runner.withPropertyValues("management.endpoint.health.group.live.include=diskSpace", this.runner.withPropertyValues("management.endpoint.health.group.live.include=diskSpace",
"management.server.port=0", "management.endpoint.health.group.live.additional-path=server:healthz", "management.server.port=0", "management.endpoint.health.group.live.additional-path=server:healthz",
"management.endpoint.health.group.live.show-components=always") "management.endpoint.health.group.live.show-components=always")
.withInitializer(new ConditionEvaluationReportLoggingListener())
.run(withWebTestClient(this::testResponse, "local.server.port")); .run(withWebTestClient(this::testResponse, "local.server.port"));
} }
@ -86,7 +84,6 @@ abstract class AbstractHealthEndpointAdditionalPathIntegrationTests<T extends Ab
"management.server.port=0", "management.endpoint.health.group.live.include=diskSpace", "management.server.port=0", "management.endpoint.health.group.live.include=diskSpace",
"management.endpoint.health.group.live.additional-path=server:healthz", "management.endpoint.health.group.live.additional-path=server:healthz",
"management.endpoint.health.group.live.show-components=always") "management.endpoint.health.group.live.show-components=always")
.withInitializer(new ConditionEvaluationReportLoggingListener())
.run(withWebTestClient((client) -> client.get().uri("/healthz").accept(MediaType.APPLICATION_JSON) .run(withWebTestClient((client) -> client.get().uri("/healthz").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isNotFound(), "local.server.port")); .exchange().expectStatus().isNotFound(), "local.server.port"));
} }
@ -97,7 +94,6 @@ abstract class AbstractHealthEndpointAdditionalPathIntegrationTests<T extends Ab
"spring.main.cloud-platform=cloud_foundry", "management.endpoint.health.group.live.include=diskSpace", "spring.main.cloud-platform=cloud_foundry", "management.endpoint.health.group.live.include=diskSpace",
"management.endpoint.health.group.live.additional-path=server:healthz", "management.endpoint.health.group.live.additional-path=server:healthz",
"management.endpoint.health.group.live.show-components=always") "management.endpoint.health.group.live.show-components=always")
.withInitializer(new ConditionEvaluationReportLoggingListener())
.run(withWebTestClient((client) -> client.get().uri("/healthz").accept(MediaType.APPLICATION_JSON) .run(withWebTestClient((client) -> client.get().uri("/healthz").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isNotFound(), "local.server.port")); .exchange().expectStatus().isNotFound(), "local.server.port"));
} }
@ -110,7 +106,6 @@ abstract class AbstractHealthEndpointAdditionalPathIntegrationTests<T extends Ab
"management.endpoint.health.group.live.include=diskSpace", "management.endpoint.health.group.live.include=diskSpace",
"management.endpoint.health.group.live.additional-path=server:healthz", "management.endpoint.health.group.live.additional-path=server:healthz",
"management.endpoint.health.group.live.show-components=always") "management.endpoint.health.group.live.show-components=always")
.withInitializer(new ConditionEvaluationReportLoggingListener())
.run(withWebTestClient((client) -> client.get().uri("/healthz").accept(MediaType.APPLICATION_JSON) .run(withWebTestClient((client) -> client.get().uri("/healthz").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isNotFound(), "local.server.port")); .exchange().expectStatus().isNotFound(), "local.server.port"));
} }

Loading…
Cancel
Save