Formatting
This commit is contained in:
@@ -44,8 +44,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
|
||||
// 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",
|
||||
"spring.config.use-legacy-processing=true", "management.security.enabled=false",
|
||||
"management.endpoints.web.exposure.include=*" },
|
||||
webEnvironment = RANDOM_PORT)
|
||||
public class ApplicationTests {
|
||||
@@ -61,12 +60,9 @@ public class ApplicationTests {
|
||||
|
||||
@BeforeClass
|
||||
public static void startConfigServer() throws IOException {
|
||||
String baseDir = ConfigServerTestUtils
|
||||
.getBaseDirectory("spring-cloud-config-sample");
|
||||
String repo = ConfigServerTestUtils.prepareLocalRepo(baseDir, "target/repos",
|
||||
"config-repo", "target/config");
|
||||
server = SpringApplication.run(
|
||||
org.springframework.cloud.config.server.ConfigServerApplication.class,
|
||||
String baseDir = ConfigServerTestUtils.getBaseDirectory("spring-cloud-config-sample");
|
||||
String repo = ConfigServerTestUtils.prepareLocalRepo(baseDir, "target/repos", "config-repo", "target/config");
|
||||
server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class,
|
||||
"--server.port=" + configPort, "--spring.config.name=server",
|
||||
"--spring.cloud.config.server.git.uri=" + repo);
|
||||
/*
|
||||
@@ -93,8 +89,8 @@ public class ApplicationTests {
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void contextLoads() {
|
||||
Map res = new TestRestTemplate().getForObject(
|
||||
"http://localhost:" + this.port + BASE_PATH + "/env/info.foo", Map.class);
|
||||
Map res = new TestRestTemplate().getForObject("http://localhost:" + this.port + BASE_PATH + "/env/info.foo",
|
||||
Map.class);
|
||||
assertThat(res).containsKey("propertySources");
|
||||
Map<String, Object> property = (Map<String, Object>) res.get("property");
|
||||
assertThat(property).containsEntry("value", "bar");
|
||||
|
||||
Reference in New Issue
Block a user