use of org.cloudfoundry.operations.applications.Route in project cf-java-client by cloudfoundry.
the class ApplicationsTest method pushMultipleRoutes.
@Test
public void pushMultipleRoutes() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
String domainName = this.nameFactory.getDomainName();
requestCreateDomain(this.cloudFoundryOperations, domainName, this.organizationName).then(this.cloudFoundryOperations.applications().pushManifest(PushApplicationManifestRequest.builder().manifest(ApplicationManifest.builder().path(new ClassPathResource("test-application.zip").getFile().toPath()).buildpack("staticfile_buildpack").disk(512).healthCheckType(ApplicationHealthCheck.PORT).memory(64).name(applicationName).route(Route.builder().route(String.format("test1.%s", domainName)).build()).route(Route.builder().route(String.format("test2.%s", domainName)).build()).build()).noStart(false).build())).thenMany(this.cloudFoundryOperations.routes().list(ListRoutesRequest.builder().build())).filter(response -> domainName.equals(response.getDomain())).map(org.cloudfoundry.operations.routes.Route::getApplications).as(StepVerifier::create).expectNextCount(2).expectComplete().verify(Duration.ofMinutes(5));
}
Aggregations