Changes to https for example.com
This commit is contained in:
@@ -57,7 +57,7 @@ class HelloRibbonClientConfiguration {
|
||||
//because of this, it doesn't use eureka to lookup the server,
|
||||
// but the classpath is tested
|
||||
BaseLoadBalancer balancer = new BaseLoadBalancer();
|
||||
balancer.setServersList(Arrays.asList(new Server("example.com", 80)));
|
||||
balancer.setServersList(Arrays.asList(new Server("example.com", 443)));
|
||||
return balancer;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class FeignClientApplication {
|
||||
}
|
||||
}
|
||||
|
||||
@FeignClient(name = "example", url = "example.com", fallback=FallbackClient.class)
|
||||
@FeignClient(name = "example", url = "https://example.com", fallback=FallbackClient.class)
|
||||
interface UrlRestClient {
|
||||
@RequestMapping(value="/", method = RequestMethod.GET)
|
||||
String hello();
|
||||
|
||||
@@ -20,7 +20,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
//Increase hystrix timeout or else requests timeout on CI server
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {"myexample.ribbon.listOfServers:example.com", "hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000"})
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {"myexample.ribbon.listOfServers:example.com:443",
|
||||
"myexample.ribbon.IsSecure:true",
|
||||
"hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000"})
|
||||
@DirtiesContext
|
||||
public class FeignClientWithServerListApplicationTests {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class FeignClientApplication {
|
||||
}
|
||||
}
|
||||
|
||||
@FeignClient(name = "example", url = "example.com")
|
||||
@FeignClient(name = "example", url = "https://example.com")
|
||||
@RequestMapping("/")
|
||||
interface RestClient {
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
|
||||
@@ -21,7 +21,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
// We disable Hystrix because we are not concerned about testing circuit breakers in this
|
||||
// test and it eliminates hystrix timeouts from messing with the request
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"myexample.ribbon.listOfServers:example.com", "feign.hystrix.enabled=false" })
|
||||
"myexample.ribbon.listOfServers:example.com:443",
|
||||
"myexample.ribbon.IsSecure:true",
|
||||
"feign.hystrix.enabled=false" })
|
||||
@DirtiesContext
|
||||
public class FeignClientWithServerListApplicationTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user