Skip to content

Commit 7f549f7

Browse files
Fix cf java client integration test
1 parent 2b7397c commit 7f549f7

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

multiapps-controller-client/src/test/java/org/cloudfoundry/multiapps/controller/client/facade/ApplicationsCloudControllerClientIntegrationTest.java

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
package org.cloudfoundry.multiapps.controller.client.facade;
22

3-
import java.net.URISyntaxException;
4-
import java.net.URL;
5-
import java.nio.file.Path;
6-
import java.nio.file.Paths;
7-
import java.util.List;
8-
import java.util.Map;
9-
import java.util.Set;
10-
import java.util.UUID;
11-
123
import org.cloudfoundry.client.v3.Metadata;
134
import org.cloudfoundry.client.v3.processes.HealthCheckType;
145
import org.cloudfoundry.multiapps.controller.client.facade.domain.CloudApplication;
@@ -35,6 +26,15 @@
3526
import org.junit.jupiter.api.Test;
3627
import org.springframework.http.HttpStatus;
3728

29+
import java.net.URISyntaxException;
30+
import java.net.URL;
31+
import java.nio.file.Path;
32+
import java.nio.file.Paths;
33+
import java.util.List;
34+
import java.util.Map;
35+
import java.util.Set;
36+
import java.util.UUID;
37+
3838
import static org.cloudfoundry.multiapps.controller.client.facade.IntegrationTestConstants.APPLICATION_HOST;
3939
import static org.cloudfoundry.multiapps.controller.client.facade.IntegrationTestConstants.DEFAULT_DOMAIN;
4040
import static org.cloudfoundry.multiapps.controller.client.facade.IntegrationTestConstants.DISK_IN_MB;
@@ -158,12 +158,22 @@ void updateApplicationHealthcheckType() {
158158
try {
159159
createAndVerifyDefaultApplication(applicationName);
160160
UUID applicationGuid = client.getApplicationGuid(applicationName);
161-
delegate.applicationsV2()
162-
.update(org.cloudfoundry.client.v2.applications.UpdateApplicationRequest.builder()
163-
.applicationId(applicationGuid.toString())
164-
.healthCheckType(
165-
HealthCheckType.NONE.getValue())
166-
.build())
161+
var processResponse = delegate.applicationsV3()
162+
.getProcess(org.cloudfoundry.client.v3.applications.GetApplicationProcessRequest.builder()
163+
.applicationId(
164+
applicationGuid.toString())
165+
.type("web")
166+
.build())
167+
.block();
168+
delegate.processes()
169+
.update(org.cloudfoundry.client.v3.processes.UpdateProcessRequest.builder()
170+
.processId(processResponse.getId())
171+
.healthCheck(
172+
org.cloudfoundry.client.v3.processes.HealthCheck.builder()
173+
.type(
174+
HealthCheckType.NONE)
175+
.build())
176+
.build())
167177
.block();
168178
CloudProcess cloudProcess = client.getApplicationProcess(applicationGuid);
169179
assertEquals(org.cloudfoundry.multiapps.controller.client.facade.domain.HealthCheckType.NONE,

0 commit comments

Comments
 (0)