|
|
@ -50,8 +50,8 @@ class AvailabilityProbesAutoConfigurationTests {
|
|
|
|
void probesWhenKubernetesAddsBeans() {
|
|
|
|
void probesWhenKubernetesAddsBeans() {
|
|
|
|
this.contextRunner.withPropertyValues("spring.main.cloud-platform=kubernetes")
|
|
|
|
this.contextRunner.withPropertyValues("spring.main.cloud-platform=kubernetes")
|
|
|
|
.run((context) -> assertThat(context).hasSingleBean(ApplicationAvailability.class)
|
|
|
|
.run((context) -> assertThat(context).hasSingleBean(ApplicationAvailability.class)
|
|
|
|
.hasSingleBean(LivenessStateHealthIndicator.class)
|
|
|
|
.hasSingleBean(LivenessStateHealthIndicator.class).hasBean("livenessStateHealthIndicator")
|
|
|
|
.hasSingleBean(ReadinessStateHealthIndicator.class)
|
|
|
|
.hasSingleBean(ReadinessStateHealthIndicator.class).hasBean("readinessStateHealthIndicator")
|
|
|
|
.hasSingleBean(AvailabilityProbesHealthEndpointGroupsPostProcessor.class));
|
|
|
|
.hasSingleBean(AvailabilityProbesHealthEndpointGroupsPostProcessor.class));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -59,8 +59,8 @@ class AvailabilityProbesAutoConfigurationTests {
|
|
|
|
void probesWhenPropertyEnabledAddsBeans() {
|
|
|
|
void probesWhenPropertyEnabledAddsBeans() {
|
|
|
|
this.contextRunner.withPropertyValues("management.endpoint.health.probes.enabled=true")
|
|
|
|
this.contextRunner.withPropertyValues("management.endpoint.health.probes.enabled=true")
|
|
|
|
.run((context) -> assertThat(context).hasSingleBean(ApplicationAvailability.class)
|
|
|
|
.run((context) -> assertThat(context).hasSingleBean(ApplicationAvailability.class)
|
|
|
|
.hasSingleBean(LivenessStateHealthIndicator.class)
|
|
|
|
.hasSingleBean(LivenessStateHealthIndicator.class).hasBean("livenessStateHealthIndicator")
|
|
|
|
.hasSingleBean(ReadinessStateHealthIndicator.class)
|
|
|
|
.hasSingleBean(ReadinessStateHealthIndicator.class).hasBean("readinessStateHealthIndicator")
|
|
|
|
.hasSingleBean(AvailabilityProbesHealthEndpointGroupsPostProcessor.class));
|
|
|
|
.hasSingleBean(AvailabilityProbesHealthEndpointGroupsPostProcessor.class));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|