Fail if no configserver config import.
Adds ConfigServerConfigDataMissingEnvironmentPostProcessor that checks if there is a spring.config.import=configserver: statement. If not, an exception is thrown and a FailureAnalyzer provides hints to fix the issue. Fixes gh-1813
This commit is contained in:
@@ -56,8 +56,8 @@ import static org.springframework.cloud.config.server.test.ConfigServerTestUtils
|
||||
import static org.springframework.cloud.config.server.test.ConfigServerTestUtils.getV2AcceptEntity;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(
|
||||
classes = TestConfiguration.class, properties = { "spring.cloud.config.enabled=true",
|
||||
@SpringBootTest(classes = TestConfiguration.class,
|
||||
properties = { "spring.cloud.config.enabled=true", "spring.cloud.bootstrap.enabled=true",
|
||||
"management.endpoint.env.post.enabled=true", "management.endpoints.web.exposure.include=env, refresh" },
|
||||
webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
@ActiveProfiles("test")
|
||||
|
||||
Reference in New Issue
Block a user