use of org.springframework.boot.actuate.health.CompositeHealth in project spring-boot by spring-projects.
the class CloudFoundryReactiveHealthEndpointWebExtensionTests method healthComponentsAlwaysPresent.
@Test
void healthComponentsAlwaysPresent() {
this.contextRunner.run((context) -> {
CloudFoundryReactiveHealthEndpointWebExtension extension = context.getBean(CloudFoundryReactiveHealthEndpointWebExtension.class);
HealthComponent body = extension.health(ApiVersion.V3).block(Duration.ofSeconds(30)).getBody();
HealthComponent health = ((CompositeHealth) body).getComponents().entrySet().iterator().next().getValue();
assertThat(((Health) health).getDetails()).containsEntry("spring", "boot");
});
}
use of org.springframework.boot.actuate.health.CompositeHealth in project spring-boot by spring-projects.
the class CloudFoundryHealthEndpointWebExtensionTests method healthComponentsAlwaysPresent.
@Test
void healthComponentsAlwaysPresent() {
this.contextRunner.run((context) -> {
CloudFoundryHealthEndpointWebExtension extension = context.getBean(CloudFoundryHealthEndpointWebExtension.class);
HealthComponent body = extension.health(ApiVersion.V3).getBody();
HealthComponent health = ((CompositeHealth) body).getComponents().entrySet().iterator().next().getValue();
assertThat(((Health) health).getDetails()).containsEntry("spring", "boot");
});
}
Aggregations