diff --git a/build.gradle b/build.gradle index cd2023cd..4a967e76 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ import java.util.concurrent.ConcurrentHashMap buildscript { ext { blockHoundVersion = "1.0.9.RELEASE" - cfJavaClientVersion = "5.10.0.RELEASE" + cfJavaClientVersion = "5.12.1.RELEASE" commonsTextVersion = "1.12.0" immutablesVersion = "2.10.1" openServiceBrokerVersion = "4.1.2" diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceComponentTest.java index fcd1bb78..410d3727 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceComponentTest.java @@ -58,6 +58,7 @@ class CreateInstanceComponentTest extends WiremockComponentTest { @Test void pushAppsWhenTheyDoNotExist() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME_1); cloudControllerFixture.stubPushApp(APP_NAME_1, matchingJsonPath("$.environment_json[?(@.SPRING_APPLICATION_JSON =~ " + diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomParametersMappingComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomParametersMappingComponentTest.java index c7d33312..fd9522c7 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomParametersMappingComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomParametersMappingComponentTest.java @@ -71,6 +71,7 @@ class CreateInstanceWithCustomParametersMappingComponentTest extends WiremockCom @Test void pushAppWithParametersTransformedUsingCustomTransformer() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME); cloudControllerFixture.stubPushApp(APP_NAME, matchingJsonPath( diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomTargetComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomTargetComponentTest.java index 96e9ffe0..ca410c31 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomTargetComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithCustomTargetComponentTest.java @@ -77,8 +77,11 @@ void pushAppWithServicesInSpace() { String serviceInstanceId = "instance-id"; String customSpace = "my-space"; String customSpaceGuid = "my-space-guid"; + + cloudControllerFixture.stubFindTestOrg(); + cloudControllerFixture.stubFindSpaceV3(customSpace, customSpaceGuid); cloudControllerFixture.stubCreateSpace(customSpace, customSpaceGuid); - cloudControllerFixture.stubAssociatePermissions(customSpace, customSpaceGuid); + cloudControllerFixture.stubAssociatePermissions(); cloudControllerFixture.stubPushApp(APP_NAME); // given services are available in the marketplace diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithEnvironmentComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithEnvironmentComponentTest.java index 36b69724..279626dc 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithEnvironmentComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithEnvironmentComponentTest.java @@ -60,6 +60,7 @@ class CreateInstanceWithEnvironmentComponentTest extends WiremockComponentTest { @Test void pushAppWithEnvironmentVariables() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME_1); cloudControllerFixture.stubPushApp(APP_NAME_1, matchingJsonPath("$.environment_json[?(@.SPRING_APPLICATION_JSON =~ /.*ENV_VAR_1.*:.*value1.*/)]"), diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithExistingServicesComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithExistingServicesComponentTest.java index ecdae1e8..4890d5a3 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithExistingServicesComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithExistingServicesComponentTest.java @@ -57,6 +57,7 @@ class CreateInstanceWithExistingServicesComponentTest extends WiremockComponentT @Test void pushAppWithServicesWhenServicesExist() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME); cloudControllerFixture.stubPushApp(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithOnlyABackingServiceComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithOnlyABackingServiceComponentTest.java index c5670fe1..4f8d27b9 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithOnlyABackingServiceComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithOnlyABackingServiceComponentTest.java @@ -57,7 +57,7 @@ class CreateInstanceWithOnlyABackingServiceComponentTest extends WiremockCompone @Test void createsServicesWhenOnlyBackingServiceIsRequested() { - + cloudControllerFixture.stubFindSpaceV3(); // given services are available in the marketplace cloudControllerFixture.stubServiceExists(BACKING_SERVICE_NAME, BACKING_PLAN_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithParametersMappingComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithParametersMappingComponentTest.java index a4a0aa5d..a2ad2bd3 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithParametersMappingComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithParametersMappingComponentTest.java @@ -60,6 +60,7 @@ class CreateInstanceWithParametersMappingComponentTest extends WiremockComponent @Test void pushAppWithParametersTransformedToEnvironmentVariables() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME); cloudControllerFixture.stubPushApp(APP_NAME, matchingJsonPath("$.environment_json[?(@.SPRING_APPLICATION_JSON =~ /.*parameter1.*:.*value1.*/)]"), diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithPropertiesComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithPropertiesComponentTest.java index 8fe6943c..20bdc6fe 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithPropertiesComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithPropertiesComponentTest.java @@ -57,6 +57,7 @@ class CreateInstanceWithPropertiesComponentTest extends WiremockComponentTest { @Test void pushAppWithProperties() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME); cloudControllerFixture.stubPushApp(APP_NAME, matchingJsonPath("$.[?(@.memory == '2048')]"), diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServiceInstanceGuidSuffixTargetComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServiceInstanceGuidSuffixTargetComponentTest.java index 9958c922..dcd5d6d9 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServiceInstanceGuidSuffixTargetComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServiceInstanceGuidSuffixTargetComponentTest.java @@ -68,6 +68,7 @@ void deployAppsWithServiceInstanceGuidSuffixOnCreateServiceWhenCreatingMoreThanO String applicationName = APP_NAME + "-" + serviceInstanceId; String backingServiceInstanceName = BACKING_SI_NAME + "-" + serviceInstanceId; + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(applicationName); cloudControllerFixture.stubPushApp(applicationName); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesComponentTest.java index c4f8eace..b05fd416 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesComponentTest.java @@ -61,6 +61,7 @@ class CreateInstanceWithServicesComponentTest extends WiremockComponentTest { @Test void pushAppWithServicesWhenServicesExist() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME); cloudControllerFixture.stubPushApp(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesParametersComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesParametersComponentTest.java index 220950f2..204a86bc 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesParametersComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithServicesParametersComponentTest.java @@ -66,6 +66,7 @@ class CreateInstanceWithServicesParametersComponentTest extends WiremockComponen @Test void pushAppWithBackingServicesParameters() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME); cloudControllerFixture.stubPushApp(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithSpacePerServiceInstanceTargetComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithSpacePerServiceInstanceTargetComponentTest.java index 7dddeeb9..46ea2ad4 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithSpacePerServiceInstanceTargetComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/CreateInstanceWithSpacePerServiceInstanceTargetComponentTest.java @@ -67,8 +67,10 @@ void pushAppWithServicesInSpace() { String serviceInstanceId = "instance-id"; String backingSpaceGuid = "my-space-guid"; + cloudControllerFixture.stubFindTestOrg(); + cloudControllerFixture.stubFindSpaceV3(serviceInstanceId, backingSpaceGuid); cloudControllerFixture.stubCreateSpace(serviceInstanceId, backingSpaceGuid); - cloudControllerFixture.stubAssociatePermissions(serviceInstanceId, backingSpaceGuid); + cloudControllerFixture.stubAssociatePermissions(); cloudControllerFixture.stubPushAppWithHost(APP_NAME, APP_NAME + "-" + serviceInstanceId); // given services are available in the marketplace diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceComponentTest.java index c04b8c83..bb914402 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceComponentTest.java @@ -60,8 +60,8 @@ class DeleteInstanceComponentTest extends WiremockComponentTest { @Test void deleteAppsWhenTheyExist() { - cloudControllerFixture.stubAppExists(APP_NAME_1); - cloudControllerFixture.stubAppExists(APP_NAME_2); + cloudControllerFixture.stubAppExistsV3(APP_NAME_1); + cloudControllerFixture.stubAppExistsV3(APP_NAME_2); cloudControllerFixture.stubServiceBindingDoesNotExist(APP_NAME_1); cloudControllerFixture.stubServiceBindingDoesNotExist(APP_NAME_2); @@ -90,6 +90,7 @@ void deleteAppsWhenTheyExist() { @Test void deleteAppsWhenTheyDoNotExist() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME_1); cloudControllerFixture.stubAppDoesNotExist(APP_NAME_2); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithAppsAndServicesComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithAppsAndServicesComponentTest.java index c277d821..f33780c3 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithAppsAndServicesComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithAppsAndServicesComponentTest.java @@ -69,6 +69,8 @@ class DeleteInstanceWithAppsAndServicesComponentTest extends WiremockComponentTe @Test void deleteAppsAndServicesWhenTheyExist() { + cloudControllerFixture.stubFindSpaceV3(); + cloudControllerFixture.stubFindSpace(); cloudControllerFixture.stubAppExistsWithBackingService(APP_NAME, BACKING_SI_NAME, BACKING_SERVICE_NAME, BACKING_PLAN_NAME); cloudControllerFixture.stubServiceBindingDoesNotExist(APP_NAME); @@ -101,6 +103,7 @@ void deleteAppsAndServicesWhenTheyExist() { @Test void deleteAppsWhenTheyExistAndServicesWhenTheyDoNotExist() { + cloudControllerFixture.stubFindSpace(); cloudControllerFixture.stubAppExists(APP_NAME); cloudControllerFixture.stubServiceBindingDoesNotExist(APP_NAME); cloudControllerFixture.stubDeleteApp(APP_NAME); @@ -126,6 +129,7 @@ void deleteAppsWhenTheyExistAndServicesWhenTheyDoNotExist() { @Test void deleteAppsAndServicesWhenTheyDoNotExist() { + cloudControllerFixture.stubFindSpace(); cloudControllerFixture.stubAppDoesNotExist(APP_NAME); // when the service instance is deleted diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithServicesComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithServicesComponentTest.java index c92c60b6..72d1e7e7 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithServicesComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/DeleteInstanceWithServicesComponentTest.java @@ -89,6 +89,7 @@ void deleteServicesWhenTheyExist() { @Test void deleteServicesWhenTheyDoNotExist() { + cloudControllerFixture.stubFindSpaceV3(); // when the service instance is deleted given(brokerFixture.serviceInstanceRequest()) .when() diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceComponentTest.java index c1278246..39a45f25 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceComponentTest.java @@ -54,6 +54,7 @@ class UpdateInstanceComponentTest extends WiremockComponentTest { @Test void updateAppsWhenTheyExist() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppExists(APP_NAME_1); cloudControllerFixture.stubUpdateApp(APP_NAME_1); cloudControllerFixture.stubAppExists(APP_NAME_2); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceAndTargetComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceAndTargetComponentTest.java index 7ee8c6d3..c80bed2e 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceAndTargetComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceAndTargetComponentTest.java @@ -25,7 +25,6 @@ import org.springframework.http.HttpStatus; import org.springframework.test.context.TestPropertySource; -import static com.github.tomakehurst.wiremock.stubbing.Scenario.STARTED; import static io.restassured.RestAssured.given; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.equalTo; @@ -80,8 +79,10 @@ void updateAppWithNewServiceAndTarget() { final String backingSpaceGuid = "instance-id-space-guid"; final String serviceInstanceId = "instance-id"; - cloudControllerFixture.stubFindSpace(serviceInstanceId, backingSpaceGuid, STARTED); - cloudControllerFixture.stubSpaceExists(serviceInstanceId, backingSpaceGuid, STARTED); + cloudControllerFixture.stubFindTestOrg(); + cloudControllerFixture.stubFindSpace(serviceInstanceId, backingSpaceGuid); + cloudControllerFixture.stubFindSpaceV3(serviceInstanceId, backingSpaceGuid); + cloudControllerFixture.stubSpaceExists(serviceInstanceId, backingSpaceGuid); cloudControllerFixture.stubAppExistsWithBackingService(APP_NAME, BACKING_SI_NAME, BACKING_SERVICE_NAME, BACKING_PLAN_NAME, backingSpaceGuid); cloudControllerFixture.stubUpdateAppWithTarget(APP_NAME, backingSpaceGuid); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceComponentTest.java index 89649514..3fb80a8e 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithNewServiceComponentTest.java @@ -74,6 +74,7 @@ class UpdateInstanceWithNewServiceComponentTest extends WiremockComponentTest { @Test void updateAppWithNewService() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppExistsWithBackingService(APP_NAME, BACKING_SI_NAME, BACKING_SERVICE_NAME, BACKING_PLAN_NAME); cloudControllerFixture.stubUpdateApp(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesComponentTest.java index edac522f..e2f5eb45 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesComponentTest.java @@ -68,6 +68,7 @@ class UpdateInstanceWithServicesComponentTest extends WiremockComponentTest { @Test void updateAppWithServices() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppExistsWithBackingService(APP_NAME, BACKING_SERVICE_INSTANCE_NAME, BACKING_SERVICE_NAME, BACKING_PLAN_NAME); cloudControllerFixture.stubUpdateApp(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesHostAndDomainComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesHostAndDomainComponentTest.java index 78b04e73..e39697ef 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesHostAndDomainComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesHostAndDomainComponentTest.java @@ -53,6 +53,8 @@ class UpdateInstanceWithServicesHostAndDomainComponentTest extends WiremockCompo @Test void updateAppWithHostAndDomain() { + cloudControllerFixture.stubFindTestOrg(); + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppExists(APP_NAME); cloudControllerFixture.stubUpdateAppWithHostAndDomain(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesParametersComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesParametersComponentTest.java index 8a55de14..9063ed90 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesParametersComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesParametersComponentTest.java @@ -73,6 +73,7 @@ class UpdateInstanceWithServicesParametersComponentTest extends WiremockComponen @Test void updateAppWithBackingServicesParameters() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppExistsWithBackingService(APP_NAME, BACKING_SI_NAME, BACKING_SERVICE_NAME, BACKING_PLAN_NAME); cloudControllerFixture.stubUpdateApp(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesRebindComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesRebindComponentTest.java index 78dca089..89d44393 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesRebindComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithServicesRebindComponentTest.java @@ -69,6 +69,7 @@ class UpdateInstanceWithServicesRebindComponentTest extends WiremockComponentTes @Test void updateAppWithServices() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppExistsWithBackingService(APP_NAME, BACKING_SI_NAME, BACKING_SERVICE_NAME, BACKING_PLAN_NAME); cloudControllerFixture.stubUpdateApp(APP_NAME); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithUpgradeComponentTest.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithUpgradeComponentTest.java index 909c5ba4..35c3998a 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithUpgradeComponentTest.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/UpdateInstanceWithUpgradeComponentTest.java @@ -54,6 +54,7 @@ class UpdateInstanceWithUpgradeComponentTest extends WiremockComponentTest { @Test void updateAppsWhenTheyExist() { + cloudControllerFixture.stubFindSpaceV3(); cloudControllerFixture.stubAppExists(APP_NAME_1); cloudControllerFixture.stubUpdateAppWithUpgrade(APP_NAME_1); diff --git a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/fixtures/CloudControllerStubFixture.java b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/fixtures/CloudControllerStubFixture.java index 3733157e..3e041d1f 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/fixtures/CloudControllerStubFixture.java +++ b/spring-cloud-app-broker-integration-tests/src/test/java/org/springframework/cloud/appbroker/integration/fixtures/CloudControllerStubFixture.java @@ -35,15 +35,10 @@ import static com.github.tomakehurst.wiremock.client.WireMock.put; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; -import static com.github.tomakehurst.wiremock.stubbing.Scenario.STARTED; @TestComponent public class CloudControllerStubFixture extends WiremockStubFixture { - private static final String SCENARIO_NAME = "CreateSpace"; - - private static final String SPACE_CREATED_STATE = "SpaceCreated"; - private static final String TEST_SPACE_GUID = "TEST-SPACE-GUID"; private static final String TEST_ORG_GUID = "TEST-ORG-GUID"; @@ -56,8 +51,8 @@ protected CloudControllerStubFixture() { public void stubCommonCloudControllerRequests() { stubGetPlatformInfo(); - stubFindTestOrg(); - stubFindSpace("development", TEST_SPACE_GUID, STARTED); + stubFindTestOrgV3(); + stubFindSpace("development", TEST_SPACE_GUID); stubFindDomains(); } @@ -73,7 +68,7 @@ private void stubGetPlatformInfo() { .withBody(cc("get-info")))); } - private void stubFindTestOrg() { + public void stubFindTestOrg() { stubFor(get(urlPathEqualTo("/v2/organizations")) .withMetadata(optionalStubMapping()) .willReturn(ok() @@ -87,10 +82,22 @@ private void stubFindTestOrg() { replace("@org-guid", TEST_ORG_GUID))))); } - public void stubFindSpace(String spaceName, String spaceGuid, String scenario) { + private void stubFindTestOrgV3() { + stubFor(get(urlPathEqualTo("/v3/organizations")) + .withMetadata(optionalStubMapping()) + .willReturn(ok() + .withBody(cc("list-organizations-v3", + replace("@org-guid", TEST_ORG_GUID))))); + + stubFor(get(urlPathEqualTo("/v3/organizations/" + TEST_ORG_GUID)) + .withMetadata(optionalStubMapping()) + .willReturn(ok() + .withBody(cc("get-organization-v3", + replace("@org-guid", TEST_ORG_GUID))))); + } + + public void stubFindSpace(String spaceName, String spaceGuid) { stubFor(get(urlPathEqualTo("/v2/spaces")) - .inScenario(SCENARIO_NAME) - .whenScenarioStateIs(scenario) .withQueryParam("q", equalTo("name:" + spaceName)) .withMetadata(optionalStubMapping()) .willReturn(ok() @@ -100,8 +107,6 @@ public void stubFindSpace(String spaceName, String spaceGuid, String scenario) { replace("@space-guid", spaceGuid))))); stubFor(get(urlPathEqualTo("/v2/spaces/" + spaceGuid)) - .inScenario(SCENARIO_NAME) - .whenScenarioStateIs(scenario) .withMetadata(optionalStubMapping()) .willReturn(ok() .withBody(cc("get-space", @@ -110,16 +115,51 @@ public void stubFindSpace(String spaceName, String spaceGuid, String scenario) { replace("@space-guid", spaceGuid))))); stubFor(get(urlPathEqualTo("/v2/spaces/" + spaceGuid + "/apps")) - .inScenario(SCENARIO_NAME) - .whenScenarioStateIs(scenario) .withQueryParam("page", equalTo("1")) .withMetadata(optionalStubMapping()) .willReturn(ok() .withBody(cc("empty-query-results")))); stubFor(get(urlPathEqualTo("/v2/spaces/" + spaceGuid + "/security_groups")) - .inScenario(SCENARIO_NAME) - .whenScenarioStateIs(scenario) + .withMetadata(optionalStubMapping()) + .willReturn(ok() + .withBody(cc("get-space-security_groups")))); + } + + public void stubFindSpaceV3() { + stubFindSpaceV3("development", TEST_SPACE_GUID); + } + + public void stubFindSpace() { + stubFindSpace("development", TEST_SPACE_GUID); + } + + public void stubFindSpaceV3(String spaceName, String spaceGuid) { + stubFor(get(urlPathEqualTo("/v3/spaces")) + .withQueryParam("names", equalTo(spaceName)) + .withQueryParam("organization_guids", equalTo(TEST_ORG_GUID)) + .withQueryParam("page", equalTo("1")) + .willReturn(ok() + .withBody(cc("list-spaces-v3", + replace("@org-guid", TEST_ORG_GUID), + replace("@name", spaceName), + replace("@space-guid", spaceGuid))))); + + stubFor(get(urlPathEqualTo("/v3/spaces/" + spaceGuid)) + .withMetadata(optionalStubMapping()) + .willReturn(ok() + .withBody(cc("get-space-v3", + replace("@name", "test"), + replace("@org-guid", TEST_ORG_GUID), + replace("@space-guid", spaceGuid))))); + + stubFor(get(urlPathEqualTo("/v3/spaces/" + spaceGuid + "/apps")) + .withQueryParam("page", equalTo("1")) + .withMetadata(optionalStubMapping()) + .willReturn(ok() + .withBody(cc("empty-query-results")))); + + stubFor(get(urlPathEqualTo("/v3/spaces/" + spaceGuid + "/security_groups")) .withMetadata(optionalStubMapping()) .willReturn(ok() .withBody(cc("get-space-security_groups")))); @@ -161,9 +201,6 @@ private void stubFindDomains() { public void stubCreateSpace(final String spaceName, final String spaceGuid) { stubFor(post(urlPathEqualTo("/v2/spaces")) - .inScenario(SCENARIO_NAME) - .whenScenarioStateIs(STARTED) - .willSetStateTo(SPACE_CREATED_STATE) .withRequestBody(matchingJsonPath("$.[?(@.name == '" + spaceName + "')]")) .withRequestBody(matchingJsonPath("$.[?(@.organization_guid == '" + TEST_ORG_GUID + "')]")) .willReturn(ok() @@ -172,7 +209,7 @@ public void stubCreateSpace(final String spaceName, final String spaceGuid) { replace("@space-guid", spaceGuid), replace("@org-guid", TEST_ORG_GUID))))); - stubFindSpace(spaceName, spaceGuid, SPACE_CREATED_STATE); + stubFindSpace(spaceName, spaceGuid); } public void stubAppDoesNotExist(final String appName) { @@ -224,10 +261,55 @@ public void stubAppExistsInSpace(final String appName, final String spaceGuid) { replace("@guid", stackGuid(appName)))))); } + public void stubAppExistsInSpaceV3(final String appName, final String spaceGuid) { + stubFor(get(urlPathEqualTo("/v3/apps/" + appGuid(appName))) + .withMetadata(optionalStubMapping()) + .willReturn(ok() + .withBody(cc("get-app-STAGED-v3", + replace("@name", appName))))); + + stubFor(get(urlPathEqualTo("/v2/spaces/" + spaceGuid + "/apps")) + .withQueryParam("q", equalTo("name:" + appName)) + .withQueryParam("page", equalTo("1")) + .willReturn(ok() + .withBody(cc("list-space-apps", + replace("@name", appName), + replace("@guid", appGuid(appName)), + replace("@space-guid", spaceGuid), + replace("@stack-guid", stackGuid(appName)))))); + + stubFor(get(urlPathEqualTo("/v2/apps/" + appGuid(appName) + "/instances")) + .willReturn(ok() + .withBody(cc("get-app-instances")))); + + stubFor(get(urlPathEqualTo("/v2/apps/" + appGuid(appName) + "/summary")) + .withMetadata(optionalStubMapping()) + .willReturn(ok() + .withBody(cc("get-app-summary", + replace("@name", appName), + replace("@guid", appGuid(appName)), + replace("@stack-guid", stackGuid(appName)), + replace("@route-guid", routeGuid(appName)))))); + + stubFor(get(urlPathEqualTo("/v2/apps/" + appGuid(appName) + "/stats")) + .willReturn(ok() + .withBody(cc("get-app-stats", + replace("@name", appName))))); + + stubFor(get(urlPathEqualTo("/v2/stacks/" + stackGuid(appName))) + .willReturn(ok() + .withBody(cc("get-stack", + replace("@guid", stackGuid(appName)))))); + } + public void stubAppExists(final String appName) { stubAppExistsInSpace(appName, TEST_SPACE_GUID); } + public void stubAppExistsV3(final String appName) { + stubAppExistsInSpaceV3(appName, TEST_SPACE_GUID); + } + public void stubAppExistsWithBackingService(final String appName, final String serviceInstanceName, final String serviceName, final String planName) { stubAppExistsWithBackingService(appName, serviceInstanceName, serviceName, planName, TEST_SPACE_GUID); @@ -649,11 +731,10 @@ public void stubServiceBindingDoesNotExist(String appName) { .withBody(cc("empty-query-results")))); } - public void stubAssociatePermissions(final String spaceName, final String spaceGuid) { + public void stubAssociatePermissions() { stubFor(get(urlPathEqualTo("/v2/config/feature_flags/set_roles_by_username")) .willReturn(ok() .withBody(cc("get-feature-flag-roles")))); - stubSpaceExists(spaceName, spaceGuid, SPACE_CREATED_STATE); stubFor(put(urlPathEqualTo("/v2/organizations/" + TEST_ORG_GUID + "/users")) .willReturn(ok())); @@ -674,10 +755,8 @@ private void stubGetServiceAndGetPlan(String serviceName, String planName) { .replace("@service-name", serviceName)))); } - public void stubSpaceExists(final String spaceName, final String spaceGuid, final String scenario) { + public void stubSpaceExists(final String spaceName, final String spaceGuid) { stubFor(get(urlPathEqualTo("/v2/organizations/" + TEST_ORG_GUID + "/spaces")) - .inScenario(SCENARIO_NAME) - .whenScenarioStateIs(scenario) .withQueryParam("q", equalTo("name:" + spaceName)) .willReturn(ok() .withBody(cc("list-spaces", diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-app-STAGED-v3.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-app-STAGED-v3.json new file mode 100644 index 00000000..75696f71 --- /dev/null +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-app-STAGED-v3.json @@ -0,0 +1,70 @@ +{ + "guid": "@guid", + "name": "@name", + "state": "started", + "created_at": "2016-03-17T21:41:30Z", + "updated_at": "2016-06-08T16:41:26Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "java_buildpack" + ], + "stack": "cflinuxfs4" + } + }, + "relationships": { + "space": { + "data": { + "guid": "@space-guid" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/@guid" + }, + "space": { + "href": "https://api.example.org/v3/spaces/@space-guid" + }, + "processes": { + "href": "https://api.example.org/v3/apps/@guid/processes" + }, + "packages": { + "href": "https://api.example.org/v3/apps/@guid/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/@guid/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/@guid/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/@guid/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/@guid/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/@guid/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/@guid/actions/stop", + "method": "POST" + }, + "revisions": { + "href": "https://api.example.org/v3/apps/@guid/revisions" + }, + "deployed_revisions": { + "href": "https://api.example.org/v3/apps/@guid/revisions/deployed" + }, + "features": { + "href": "https://api.example.org/v3/apps/@guid/features" + } + }, + "metadata": { + "labels": {}, + "annotations": {} + } +} diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-organization-v3.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-organization-v3.json new file mode 100644 index 00000000..02e4d38c --- /dev/null +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-organization-v3.json @@ -0,0 +1,32 @@ +{ + "guid": "@org-guid", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "my-organization", + "suspended": false, + "relationships": { + "quota": { + "data": { + "guid": "b7887f5c-34bb-40c5-9778-577572e4fb2d" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/@org-guid" + }, + "domains": { + "href": "https://api.example.org/v3/organizations/@org-guid/domains" + }, + "default_domain": { + "href": "https://api.example.org/v3/organizations/@org-guid/domains/default" + }, + "quota": { + "href": "https://api.example.org/v3/organization_quotas/b7887f5c-34bb-40c5-9778-577572e4fb2d" + } + }, + "metadata": { + "labels": {}, + "annotations": {} + } +} diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-organization.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-organization.json index 77d82772..9695a713 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-organization.json +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-organization.json @@ -22,4 +22,4 @@ "app_events_url": "/v2/organizations/@org-guid/app_events", "space_quota_definitions_url": "/v2/organizations/@org-guid/space_quota_definitions" } -} \ No newline at end of file +} diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-space-v3.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-space-v3.json new file mode 100644 index 00000000..a1976520 --- /dev/null +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-space-v3.json @@ -0,0 +1,35 @@ +{ + "guid": "@space-guid", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "@name", + "relationships": { + "organization": { + "data": { + "guid": "@org-guid" + } + }, + "quota": { + "data": null + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/@space-guid" + }, + "features": { + "href": "https://api.example.org/v3/spaces/@space-guid/features" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/@org-guid" + }, + "apply_manifest": { + "href": "https://api.example.org/v3/spaces/@space-guid/actions/apply_manifest", + "method": "POST" + } + }, + "metadata": { + "labels": {}, + "annotations": {} + } +} diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-space.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-space.json index e129cde0..c86c28e5 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-space.json +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/get-space.json @@ -2,14 +2,13 @@ "metadata": { "guid": "@space-guid", "url": "/v2/spaces/@space-guid", - "created_at": "2018-07-19T20:34:16Z", - "updated_at": "2018-07-19T20:34:16Z" + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" }, "entity": { "name": "@name", "organization_guid": "@org-guid", "space_quota_definition_guid": null, - "isolation_segment_guid": null, "allow_ssh": true, "organization_url": "/v2/organizations/@org-guid", "developers_url": "/v2/spaces/@space-guid/developers", diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-organizations-v3.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-organizations-v3.json new file mode 100644 index 00000000..e62a327c --- /dev/null +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-organizations-v3.json @@ -0,0 +1,48 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/organizations?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/organizations?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "TEST-ORG-GUID", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "org1", + "suspended": false, + "relationships": { + "quota": { + "data": { + "guid": "@org-guid" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/TEST-ORG-GUID" + }, + "domains": { + "href": "https://api.example.org/v3/organizations/TEST-ORG-GUID/domains" + }, + "default_domain": { + "href": "https://api.example.org/v3/organizations/TEST-ORG-GUID/domains/default" + }, + "quota": { + "href": "https://api.example.org/v3/organization_quotas/@org-guid" + } + }, + "metadata": { + "labels": {}, + "annotations": {} + } + } + ] +} diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-organizations.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-organizations.json index 970afc8e..42283d8e 100644 --- a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-organizations.json +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-organizations.json @@ -30,4 +30,4 @@ } } ] -} \ No newline at end of file +} diff --git a/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-spaces-v3.json b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-spaces-v3.json new file mode 100644 index 00000000..37db7cae --- /dev/null +++ b/spring-cloud-app-broker-integration-tests/src/test/resources/responses/cloudcontroller/list-spaces-v3.json @@ -0,0 +1,51 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/spaces?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/spaces?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "@space-guid", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "@name", + "relationships": { + "organization": { + "data": { + "guid": "@org-guid" + } + }, + "quota": { + "data": null + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/@space-guid" + }, + "features": { + "href": "https://api.example.org/v3/spaces/@space-guid/features" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/@org-guid" + }, + "apply_manifest": { + "href": "https://api.example.org/v3/spaces/@space-guid/actions/apply_manifest", + "method": "POST" + } + }, + "metadata": { + "labels": {}, + "annotations": {} + } + } + ] +}