Support for new ConfigDataLoader infrastructure. (#1656)
This allows for `spring.config.import=configserver:` Supports the fact that bootstrap is now opt in. In config client, by default, `ConfigServerConfigData*` will be used instead of `ConfigServicePropertySourceLocator`.
This commit is contained in:
@@ -52,6 +52,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
|
||||
// config
|
||||
// server on the classpath we need to set it explicitly
|
||||
properties = { "spring.cloud.config.enabled:true", "",
|
||||
"spring.config.use-legacy-processing=true",
|
||||
"management.security.enabled=false",
|
||||
"management.endpoints.web.exposure.include=*" },
|
||||
webEnvironment = RANDOM_PORT)
|
||||
@@ -76,6 +77,8 @@ public class ApplicationBootstrapTests {
|
||||
System.setProperty("repo1", repo);
|
||||
server = SpringApplication.run(
|
||||
org.springframework.cloud.config.server.ConfigServerApplication.class,
|
||||
// FIXME: configdata why is use legacy needed here and above?
|
||||
"--spring.config.use-legacy-processing=true",
|
||||
"--server.port=" + configPort, "--spring.config.name=compositeserver",
|
||||
"--repo1=" + repo);
|
||||
System.setProperty("config.port", "" + configPort);
|
||||
|
||||
@@ -25,11 +25,13 @@ import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class ApplicationFailFastTests {
|
||||
|
||||
// FIXME: configdata failfast works.
|
||||
@Test
|
||||
public void contextFails() {
|
||||
try {
|
||||
new SpringApplicationBuilder().sources(Application.class).run(
|
||||
"--server.port=0", "--spring.cloud.config.enabled=true",
|
||||
"--spring.config.use-legacy-processing=true", "--server.port=0",
|
||||
"--spring.cloud.config.enabled=true",
|
||||
"--spring.cloud.config.fail-fast=true",
|
||||
"--spring.cloud.config.uri=http://serverhostdoesnotexist:1234");
|
||||
fail("failFast option did not produce an exception");
|
||||
|
||||
@@ -43,6 +43,8 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
|
||||
// config
|
||||
// server on the classpath we need to set it explicitly
|
||||
properties = { "spring.cloud.config.enabled:true",
|
||||
// FIXME: configdata why is this needed here?
|
||||
"spring.config.use-legacy-processing=true",
|
||||
"management.security.enabled=false",
|
||||
"management.endpoints.web.exposure.include=*" },
|
||||
webEnvironment = RANDOM_PORT)
|
||||
|
||||
Reference in New Issue
Block a user