Skip to content

Commit

Permalink
formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pivotal-david-osullivan authored and anthonydahanne committed Nov 1, 2024
1 parent 5ca7ff2 commit 60e1dc1
Showing 1 changed file with 34 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,38 +237,47 @@ private static Mono<Void> createApplication(
.name(name)
.path(path)
.noStart(false)
.build());
}

@Test
public void updateReadinessHealthCheckType() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
Path path = new ClassPathResource("test-application.zip").getFile().toPath();
Path path = new ClassPathResource("test-application.zip").getFile().toPath();

createApplication(this.cloudFoundryOperations, applicationName, path)
.then(getApplicationId(this.cloudFoundryOperations, applicationName))
.flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId))
.flatMap(processId -> this.cloudFoundryClient.processes()
.update(UpdateProcessRequest.builder()
.readinessHealthCheck(ReadinessHealthCheck
.builder()
.data(Data
.builder()
.endpoint("/test_endpoint")
.invocationTimeout(1)
.interval(2)
.build())
.type(ReadinessHealthCheckType.PORT)
.build())
.processId(processId)
.build())
.then(Mono.just(processId)))
.flatMap(processId -> requestGetProcess(this.cloudFoundryClient, processId))
.map(GetProcessResponse::getReadinessHealthCheck)
.map(ReadinessHealthCheck::getType)
.as(StepVerifier::create)
.expectNext(ReadinessHealthCheckType.PORT)
.expectComplete()
.verify(Duration.ofMinutes(5));
.then(getApplicationId(this.cloudFoundryOperations, applicationName))
.flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId))
.flatMap(
processId ->
this.cloudFoundryClient
.processes()
.update(
UpdateProcessRequest.builder()
.readinessHealthCheck(
ReadinessHealthCheck.builder()
.data(
Data.builder()
.endpoint(
"/test_endpoint")
.invocationTimeout(
1)
.interval(2)
.build())
.type(
ReadinessHealthCheckType
.PORT)
.build())
.processId(processId)
.build())
.then(Mono.just(processId)))
.flatMap(processId -> requestGetProcess(this.cloudFoundryClient, processId))
.map(GetProcessResponse::getReadinessHealthCheck)
.map(ReadinessHealthCheck::getType)
.as(StepVerifier::create)
.expectNext(ReadinessHealthCheckType.PORT)
.expectComplete()
.verify(Duration.ofMinutes(5));
}

private static Mono<String> getApplicationId(
Expand Down

0 comments on commit 60e1dc1

Please sign in to comment.