diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceInstances/ReactorServiceInstancesV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java similarity index 100% rename from cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceInstances/ReactorServiceInstancesV3Test.java rename to cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/InfoTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/InfoTest.java index a4395079a5..b94c87a187 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v2/InfoTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/InfoTest.java @@ -43,8 +43,15 @@ public void info() { .consumeNextWith( response -> { Version expected = Version.valueOf(SUPPORTED_API_VERSION); - Version actual = Version.valueOf(response.getApiVersion()); - + Version actual; + String version = response.getApiVersion(); + if (version == null || version.isEmpty()) { + assertThat("CF API v2 is disabled") + .isEqualTo(response.getSupport()); + actual = Version.of(0, 0, 0); + } else { + actual = Version.valueOf(version); + } assertThat(actual).isLessThanOrEqualTo(expected); }) .expectComplete() diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/SpacesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/SpacesTest.java index 54fc74e861..ee2e2fa6f6 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v2/SpacesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/SpacesTest.java @@ -24,6 +24,7 @@ import java.time.Instant; import java.util.Collections; import java.util.Date; +import java.util.List; import java.util.function.Function; import java.util.function.UnaryOperator; import org.cloudfoundry.AbstractIntegrationTest; @@ -109,7 +110,6 @@ import org.cloudfoundry.util.JobUtils; import org.cloudfoundry.util.PaginationUtils; import org.cloudfoundry.util.ResourceUtils; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import reactor.core.publisher.Flux; @@ -1885,13 +1885,9 @@ public void listServicesFilterByLabel() { .verify(Duration.ofMinutes(5)); } - // TODO: Await https://github.com/cloudfoundry/cloud_controller_ng/issues/856 for this test to - // work - @Disabled( - "Await https://github.com/cloudfoundry/cloud_controller_ng/issues/856 for this test to" - + " work") @Test public void listServicesFilterByServiceBrokerId() { + List expectedValues = List.of(this.serviceName, this.serviceName + "-shareable"); Mono.zip(this.serviceBrokerId, this.spaceId) .flatMapMany( function( @@ -1903,9 +1899,10 @@ public void listServicesFilterByServiceBrokerId() { builder.serviceBrokerId(serviceBrokerId)))) .map(response -> response.getEntity().getLabel()) .as(StepVerifier::create) - .expectNext(this.serviceName) + .consumeNextWith(element -> assertThat(element).isIn(expectedValues)) + .consumeNextWith(element -> assertThat(element).isIn(expectedValues)) .expectComplete() - .verify(Duration.ofMinutes(5)); + .verify(Duration.ofMinutes(10)); } @Test diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationsTest.java index e3da7d85e6..b62945d504 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationsTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationsTest.java @@ -183,7 +183,21 @@ public void getDefaultDomain() { .map(GetOrganizationDefaultDomainResponse::getName) .as(StepVerifier::create) .consumeNextWith( - name -> assertThat(name).contains("apps.", ".shepherd.tanzu.broadcom.net")) + name -> { + assertThat(name) + .satisfiesAnyOf( + nameParam -> + assertThat(nameParam) + .contains( + "apps.", + ".shepherd.tanzu.broadcom.net"), + nameParam -> + assertThat(nameParam) + .contains( + "apps.", + ".127-0-0-1.nip.io")); // when + // testing with kind-deploy. + }) .expectComplete() .verify(Duration.ofMinutes(5)); } diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java index 13b9fc1d3b..d84a820794 100644 --- a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java @@ -2020,7 +2020,7 @@ private static Mono createDockerApplication( .push( PushApplicationRequest.builder() .diskQuota(512) - .dockerImage("cloudfoundry/lattice-app") + .dockerImage("cloudfoundry/grace") .healthCheckType(ApplicationHealthCheck.PORT) .memory(64) .name(name)