Fixing broken tests

This commit is contained in:
Ryan Baxter
2019-03-28 11:58:51 -04:00
parent f7cb82abb5
commit 6d77a2e25a
4 changed files with 9 additions and 8 deletions

View File

@@ -360,9 +360,9 @@ public class EurekaClientAutoConfigurationTests {
.getBean(EurekaInstanceConfigBean.class);
assertThat(instance.getStatusPageUrl()).as("statusPageUrl is wrong")
.isEqualTo("https://192.168.13.90:9999/actuator/info");
.isEqualTo("http://192.168.13.90:9999/actuator/info");
assertThat(instance.getHealthCheckUrl()).as("healthCheckUrl is wrong")
.isEqualTo("https://192.168.13.90:9999/actuator/health");
.isEqualTo("http://192.168.13.90:9999/actuator/health");
}
@Test

View File

@@ -76,15 +76,15 @@ public class EurekaClientConfigBeanTests {
source.addPropertySource(new MapPropertySource("config",
Collections.<String, Object>singletonMap(
"eureka.client.serviceUrl.defaultZone",
"https://example.com,http://example2.com, https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com")));
"https://example.com,https://example2.com, https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com")));
this.context.register(PropertyPlaceholderAutoConfiguration.class,
TestConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(EurekaClientConfigBean.class).getServiceUrl()
.toString()).isEqualTo(
"{defaultZone=https://example.com,http://example2.com, https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com}");
"{defaultZone=https://example.com,https://example2.com, https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com}");
assertThat(getEurekaServiceUrlsForDefaultZone()).isEqualTo(
"[https://example.com/, https://example2.com/, https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com]");
"[https://example.com/, https://example2.com/, https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com/]");
}
@Test

View File

@@ -32,9 +32,9 @@ import static org.springframework.cloud.netflix.eureka.server.EurekaControllerTe
public class EurekaControllerReplicasTests {
String noAuthList1 = "http://test1.com";
String noAuthList1 = "https://test1.com";
String noAuthList2 = noAuthList1 + ",http://test2.com";
String noAuthList2 = noAuthList1 + ",https://test2.com";
String authList1 = "https://user:pwd@test1.com";

View File

@@ -43,7 +43,8 @@ public class OkHttpStatusCodeExceptionTest {
.message("Success")
.body(ResponseBody.create(MediaType.parse("text/plain"), "foo"))
.protocol(Protocol.HTTP_1_1)
.request(new Request.Builder().url("https://service.com").build()).build();
.request(new Request.Builder().url("https://service.com").build())
.build();
ResponseBody body = response.peekBody(Integer.MAX_VALUE);
OkHttpStatusCodeException ex = new OkHttpStatusCodeException("service", response,
body, new URI("https://service.com"));