|
|
@ -31,12 +31,10 @@ import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoCon
|
|
|
|
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener;
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
|
|
|
|
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
|
|
|
|
import org.springframework.boot.logging.LogLevel;
|
|
|
|
|
|
|
|
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
|
|
|
|
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
|
|
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
@ -62,8 +60,7 @@ class CloudFoundryInfoEndpointWebExtensionTests {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
void gitFullDetailsAlwaysPresent() {
|
|
|
|
void gitFullDetailsAlwaysPresent() {
|
|
|
|
this.contextRunner.withInitializer(new ConditionEvaluationReportLoggingListener(LogLevel.INFO))
|
|
|
|
this.contextRunner.run((context) -> {
|
|
|
|
.run((context) -> {
|
|
|
|
|
|
|
|
CloudFoundryInfoEndpointWebExtension extension = context
|
|
|
|
CloudFoundryInfoEndpointWebExtension extension = context
|
|
|
|
.getBean(CloudFoundryInfoEndpointWebExtension.class);
|
|
|
|
.getBean(CloudFoundryInfoEndpointWebExtension.class);
|
|
|
|
Map<String, Object> git = (Map<String, Object>) extension.info().get("git");
|
|
|
|
Map<String, Object> git = (Map<String, Object>) extension.info().get("git");
|
|
|
|