Add scheme to test URLs (#1250)
This commit is contained in:
@@ -113,7 +113,7 @@ class KubernetesClientCatalogWatchIT {
|
||||
*/
|
||||
private void test() {
|
||||
|
||||
WebClient client = builder().baseUrl("localhost/result").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/result").build();
|
||||
EndpointNameAndNamespace[] holder = new EndpointNameAndNamespace[2];
|
||||
ResolvableType resolvableType = ResolvableType.forClassWithGenerics(List.class, EndpointNameAndNamespace.class);
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ public class KubernetesClientCatalogWatchNamespacesIT {
|
||||
*/
|
||||
private void test() {
|
||||
|
||||
WebClient client = builder().baseUrl("localhost/result").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/result").build();
|
||||
EndpointNameAndNamespace[] holder = new EndpointNameAndNamespace[4];
|
||||
ResolvableType resolvableType = ResolvableType.forClassWithGenerics(List.class, EndpointNameAndNamespace.class);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ class Fabric8CatalogWatchIT {
|
||||
@SuppressWarnings("unchecked")
|
||||
private void test() {
|
||||
|
||||
WebClient client = builder().baseUrl("localhost/result").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/result").build();
|
||||
EndpointNameAndNamespace[] holder = new EndpointNameAndNamespace[2];
|
||||
ResolvableType resolvableType = ResolvableType.forClassWithGenerics(List.class, EndpointNameAndNamespace.class);
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ class Fabric8CatalogWatchWithNamespacesIT {
|
||||
@SuppressWarnings("unchecked")
|
||||
private void test() {
|
||||
|
||||
WebClient client = builder().baseUrl("localhost/result").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/result").build();
|
||||
EndpointNameAndNamespace[] holder = new EndpointNameAndNamespace[2];
|
||||
ResolvableType resolvableType = ResolvableType.forClassWithGenerics(List.class, EndpointNameAndNamespace.class);
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class ConfigMapEventReloadIT {
|
||||
Commons.assertReloadLogStatements("added configmap informer for namespace",
|
||||
"added secret informer for namespace", IMAGE_NAME);
|
||||
|
||||
WebClient webClient = builder().baseUrl("localhost/left").build();
|
||||
WebClient webClient = builder().baseUrl("http://localhost/left").build();
|
||||
String result = webClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec())
|
||||
.block();
|
||||
|
||||
@@ -111,7 +111,7 @@ class ConfigMapEventReloadIT {
|
||||
Assertions.assertEquals("left-initial", result);
|
||||
|
||||
// then read the value from the right-configmap
|
||||
webClient = builder().baseUrl("localhost/right").build();
|
||||
webClient = builder().baseUrl("http://localhost/right").build();
|
||||
result = webClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec()).block();
|
||||
Assertions.assertEquals("right-initial", result);
|
||||
|
||||
@@ -125,7 +125,7 @@ class ConfigMapEventReloadIT {
|
||||
// wait dummy for 5 seconds
|
||||
LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(5));
|
||||
|
||||
webClient = builder().baseUrl("localhost/left").build();
|
||||
webClient = builder().baseUrl("http://localhost/left").build();
|
||||
result = webClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec()).block();
|
||||
// left configmap has not changed, no restart of app has happened
|
||||
Assertions.assertEquals("left-initial", result);
|
||||
@@ -148,7 +148,7 @@ class ConfigMapEventReloadIT {
|
||||
"added secret informer for namespace", IMAGE_NAME);
|
||||
|
||||
// read the value from the right-configmap
|
||||
WebClient webClient = builder().baseUrl("localhost/right").build();
|
||||
WebClient webClient = builder().baseUrl("http://localhost/right").build();
|
||||
String result = webClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec())
|
||||
.block();
|
||||
Assertions.assertEquals("right-initial", result);
|
||||
@@ -162,7 +162,7 @@ class ConfigMapEventReloadIT {
|
||||
|
||||
String[] resultAfterChange = new String[1];
|
||||
await().pollInterval(Duration.ofSeconds(3)).atMost(Duration.ofSeconds(90)).until(() -> {
|
||||
WebClient innerWebClient = builder().baseUrl("localhost/right").build();
|
||||
WebClient innerWebClient = builder().baseUrl("http://localhost/right").build();
|
||||
String innerResult = innerWebClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class)
|
||||
.retryWhen(retrySpec()).block();
|
||||
resultAfterChange[0] = innerResult;
|
||||
@@ -189,13 +189,13 @@ class ConfigMapEventReloadIT {
|
||||
"added secret informer for namespace", IMAGE_NAME);
|
||||
|
||||
// read the initial value from the right-configmap
|
||||
WebClient rightWebClient = builder().baseUrl("localhost/right").build();
|
||||
WebClient rightWebClient = builder().baseUrl("http://localhost/right").build();
|
||||
String rightResult = rightWebClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class)
|
||||
.retryWhen(retrySpec()).block();
|
||||
Assertions.assertEquals("right-initial", rightResult);
|
||||
|
||||
// then read the initial value from the right-with-label-configmap
|
||||
WebClient rightWithLabelWebClient = builder().baseUrl("localhost/with-label").build();
|
||||
WebClient rightWithLabelWebClient = builder().baseUrl("http://localhost/with-label").build();
|
||||
String rightWithLabelResult = rightWithLabelWebClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class)
|
||||
.retryWhen(retrySpec()).block();
|
||||
Assertions.assertEquals("right-with-label-initial", rightWithLabelResult);
|
||||
@@ -227,7 +227,7 @@ class ConfigMapEventReloadIT {
|
||||
// value
|
||||
String[] resultAfterChange = new String[1];
|
||||
await().pollInterval(Duration.ofSeconds(3)).atMost(Duration.ofSeconds(90)).until(() -> {
|
||||
WebClient innerWebClient = builder().baseUrl("localhost/with-label").build();
|
||||
WebClient innerWebClient = builder().baseUrl("http://localhost/with-label").build();
|
||||
String innerResult = innerWebClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class)
|
||||
.retryWhen(retrySpec()).block();
|
||||
resultAfterChange[0] = innerResult;
|
||||
|
||||
@@ -80,7 +80,7 @@ class ConfigMapPollingReloadIT {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
WebClient webClient = builder().baseUrl("localhost/key").build();
|
||||
WebClient webClient = builder().baseUrl("http://localhost/key").build();
|
||||
String result = webClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec())
|
||||
.block();
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class Fabric8ConfigMapIT {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
WebClient client = builder().baseUrl("localhost/key1").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/key1").build();
|
||||
|
||||
String result = client.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec())
|
||||
.block();
|
||||
|
||||
@@ -90,7 +90,7 @@ class Fabric8DiscoveryIT {
|
||||
*/
|
||||
@Test
|
||||
void testAllServices() {
|
||||
WebClient client = builder().baseUrl("localhost/services").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/services").build();
|
||||
|
||||
List<String> result = client.method(HttpMethod.GET).retrieve()
|
||||
.bodyToMono(new ParameterizedTypeReference<List<String>>() {
|
||||
@@ -107,7 +107,7 @@ class Fabric8DiscoveryIT {
|
||||
@Test
|
||||
void testExternalNameServiceInstance() {
|
||||
|
||||
WebClient client = builder().baseUrl("localhost/service-instances/external-name-service").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/service-instances/external-name-service").build();
|
||||
List<DefaultKubernetesServiceInstance> serviceInstances = client.method(HttpMethod.GET).retrieve()
|
||||
.bodyToMono(new ParameterizedTypeReference<List<DefaultKubernetesServiceInstance>>() {
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class Fabric8DiscoveryNamespaceFilterIT {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
WebClient clientServices = builder().baseUrl("localhost/services").build();
|
||||
WebClient clientServices = builder().baseUrl("http://localhost/services").build();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> services = (List<String>) clientServices.method(HttpMethod.GET).retrieve().bodyToMono(List.class)
|
||||
@@ -103,7 +103,7 @@ class Fabric8DiscoveryNamespaceFilterIT {
|
||||
Assertions.assertEquals(services.size(), 1);
|
||||
Assertions.assertTrue(services.contains("service-wiremock"));
|
||||
|
||||
WebClient clientEndpoints = builder().baseUrl("localhost/endpoints/service-wiremock").build();
|
||||
WebClient clientEndpoints = builder().baseUrl("http://localhost/endpoints/service-wiremock").build();
|
||||
|
||||
List<Endpoints> endpoints = clientEndpoints.method(HttpMethod.GET).retrieve()
|
||||
.bodyToMono(new ParameterizedTypeReference<List<Endpoints>>() {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class Fabric8ClientLoadbalancerIT {
|
||||
|
||||
manifests("SERVICE", Phase.CREATE);
|
||||
|
||||
WebClient client = builder().baseUrl("localhost/loadbalancer-it/servicea").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/loadbalancer-it/servicea").build();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, String> mapResult = (Map<String, String>) client.method(HttpMethod.GET).retrieve()
|
||||
@@ -111,7 +111,7 @@ public class Fabric8ClientLoadbalancerIT {
|
||||
|
||||
manifests("POD", Phase.CREATE);
|
||||
|
||||
WebClient client = builder().baseUrl("localhost/loadbalancer-it/servicea").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/loadbalancer-it/servicea").build();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, String> mapResult = (Map<String, String>) client.method(HttpMethod.GET).retrieve()
|
||||
|
||||
@@ -84,7 +84,7 @@ class SecretsEventsReloadIT {
|
||||
void test() {
|
||||
Commons.assertReloadLogStatements("added secret informer for namespace",
|
||||
"added configmap informer for namespace", IMAGE_NAME);
|
||||
WebClient webClient = builder().baseUrl("localhost/key").build();
|
||||
WebClient webClient = builder().baseUrl("http://localhost/key").build();
|
||||
String result = webClient.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec())
|
||||
.block();
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class SimpleCoreIT {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
WebClient client = builder().baseUrl("localhost/message").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/message").build();
|
||||
|
||||
String result = client.method(HttpMethod.GET).retrieve().bodyToMono(String.class).retryWhen(retrySpec())
|
||||
.block();
|
||||
|
||||
@@ -109,7 +109,7 @@ class Fabric8IstioIT {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
WebClient client = builder().baseUrl("localhost/profiles").build();
|
||||
WebClient client = builder().baseUrl("http://localhost/profiles").build();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> result = client.method(HttpMethod.GET).retrieve().bodyToMono(List.class).retryWhen(retrySpec())
|
||||
|
||||
Reference in New Issue
Block a user