mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-07 17:59:02 +00:00
Merge branch '4.0.x'
Closes Closes gh-49480
This commit is contained in:
@@ -49,6 +49,10 @@ public enum CloudPlatform {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsingForwardHeaders() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -271,6 +271,7 @@ class CloudPlatformTests {
|
||||
assertThat(CloudPlatform.KUBERNETES.isEnforced(binder)).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void isActiveWhenNoCloudPlatformIsEnforcedAndHasKubernetesServiceHostAndKubernetesServicePort() {
|
||||
Map<String, Object> envVars = new HashMap<>();
|
||||
envVars.put("EXAMPLE_SERVICE_HOST", "---");
|
||||
@@ -281,6 +282,11 @@ class CloudPlatformTests {
|
||||
.containsExactly(CloudPlatform.NONE);
|
||||
}
|
||||
|
||||
@Test
|
||||
void nonePlatformShouldDisableCloudPlatformFeatures() {
|
||||
assertThat(CloudPlatform.NONE.isUsingForwardHeaders()).isFalse();
|
||||
}
|
||||
|
||||
private Environment getEnvironmentWithEnvVariables(Map<String, Object> environmentVariables) {
|
||||
MockEnvironment environment = new MockEnvironment();
|
||||
PropertySource<?> propertySource = new SystemEnvironmentPropertySource(
|
||||
|
||||
Reference in New Issue
Block a user