diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc index 99b2a4df..c9018e65 100644 --- a/docs/src/main/asciidoc/spring-cloud-commons.adoc +++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc @@ -500,7 +500,7 @@ public class MyClass { } public String doStuff() { - return restTemplate.getForObject("https://example.com", String.class); + return restTemplate.getForObject("http://example.com", String.class); } } ---- diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientTests.java index d60d5436..83d36338 100644 --- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientTests.java +++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientTests.java @@ -38,10 +38,10 @@ import static org.springframework.cloud.client.discovery.composite.CompositeDisc @RunWith(SpringRunner.class) @SpringBootTest(properties = { "spring.application.name=service0", - "spring.cloud.discovery.client.simple.instances.service1[0].uri=http://s1-1:8080", - "spring.cloud.discovery.client.simple.instances.service1[1].uri=https://s1-2:8443", - "spring.cloud.discovery.client.simple.instances.service2[0].uri=https://s2-1:8080", - "spring.cloud.discovery.client.simple.instances.service2[1].uri=https://s2-2:443" }, classes = { + "spring.cloud.discovery.client.simple.instances.service1[0].uri=http://s11:8080", + "spring.cloud.discovery.client.simple.instances.service1[1].uri=https://s12:8443", + "spring.cloud.discovery.client.simple.instances.service2[0].uri=https://s21:8080", + "spring.cloud.discovery.client.simple.instances.service2[1].uri=https://s22:443" }, classes = { CompositeDiscoveryClientTestsConfig.class }) public class CompositeDiscoveryClientTests { @@ -55,9 +55,9 @@ public class CompositeDiscoveryClientTests { then(this.discoveryClient.getInstances("service1")).hasSize(2); ServiceInstance s1 = this.discoveryClient.getInstances("service1").get(0); - then(s1.getHost()).isEqualTo("s1-1"); + then(s1.getHost()).isEqualTo("s11"); then(s1.getPort()).isEqualTo(8080); - then(s1.getUri()).isEqualTo(URI.create("http://s1-1:8080")); + then(s1.getUri()).isEqualTo(URI.create("http://s11:8080")); then(s1.isSecure()).isEqualTo(false); } diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientPropertiesMappingTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientPropertiesMappingTests.java index 8106b36a..1ac2f010 100644 --- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientPropertiesMappingTests.java +++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientPropertiesMappingTests.java @@ -38,10 +38,10 @@ import static org.assertj.core.api.BDDAssertions.then; @RunWith(SpringRunner.class) @SpringBootTest(properties = { "spring.application.name=service0", - "spring.cloud.discovery.client.simple.instances.service1[0].uri=http://s1-1:8080", - "spring.cloud.discovery.client.simple.instances.service1[1].uri=https://s1-2:8443", - "spring.cloud.discovery.client.simple.instances.service2[0].uri=https://s2-1:8080", - "spring.cloud.discovery.client.simple.instances.service2[1].uri=https://s2-2:443" }) + "spring.cloud.discovery.client.simple.instances.service1[0].uri=http://s11:8080", + "spring.cloud.discovery.client.simple.instances.service1[1].uri=https://s12:8443", + "spring.cloud.discovery.client.simple.instances.service2[0].uri=https://s21:8080", + "spring.cloud.discovery.client.simple.instances.service2[1].uri=https://s22:443" }) public class SimpleDiscoveryClientPropertiesMappingTests { @Autowired @@ -54,20 +54,18 @@ public class SimpleDiscoveryClientPropertiesMappingTests { public void propsShouldGetCleanlyMapped() { then(this.props.getInstances().size()).isEqualTo(2); then(this.props.getInstances().get("service1").size()).isEqualTo(2); - then(this.props.getInstances().get("service1").get(0).getHost()) - .isEqualTo("s1-1"); + then(this.props.getInstances().get("service1").get(0).getHost()).isEqualTo("s11"); then(this.props.getInstances().get("service1").get(0).getPort()).isEqualTo(8080); then(this.props.getInstances().get("service1").get(0).getUri()) - .isEqualTo(URI.create("http://s1-1:8080")); + .isEqualTo(URI.create("http://s11:8080")); then(this.props.getInstances().get("service1").get(0).isSecure()) .isEqualTo(false); then(this.props.getInstances().get("service2").size()).isEqualTo(2); - then(this.props.getInstances().get("service2").get(0).getHost()) - .isEqualTo("s2-1"); + then(this.props.getInstances().get("service2").get(0).getHost()).isEqualTo("s21"); then(this.props.getInstances().get("service2").get(0).getPort()).isEqualTo(8080); then(this.props.getInstances().get("service2").get(0).getUri()) - .isEqualTo(URI.create("https://s2-1:8080")); + .isEqualTo(URI.create("https://s21:8080")); then(this.props.getInstances().get("service2").get(0).isSecure()).isEqualTo(true); } @@ -77,9 +75,9 @@ public class SimpleDiscoveryClientPropertiesMappingTests { then(this.discoveryClient.getInstances("service1")).hasSize(2); ServiceInstance s1 = this.discoveryClient.getInstances("service1").get(0); - then(s1.getHost()).isEqualTo("s1-1"); + then(s1.getHost()).isEqualTo("s11"); then(s1.getPort()).isEqualTo(8080); - then(s1.getUri()).isEqualTo(URI.create("http://s1-1:8080")); + then(s1.getUri()).isEqualTo(URI.create("http://s11:8080")); then(s1.isSecure()).isEqualTo(false); } diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/config/BootstrapConfigurationTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/config/BootstrapConfigurationTests.java index 7fac3b37..ef742e1b 100644 --- a/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/config/BootstrapConfigurationTests.java +++ b/spring-cloud-context/src/test/java/org/springframework/cloud/bootstrap/config/BootstrapConfigurationTests.java @@ -371,7 +371,7 @@ public class BootstrapConfigurationTests { } @Test - @Ignore //FIXME 2.2.0.M1 + @Ignore // FIXME 2.2.0.M1 public void includeProfileFromBootstrapProperties() { this.context = new SpringApplicationBuilder().web(WebApplicationType.NONE) .sources(BareConfiguration.class)