use of org.cloudfoundry.operations.applications.ApplicationDetail in project cf-java-client by cloudfoundry.
the class ApplicationsTest method get.
@Test
public void get() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, false).then(this.cloudFoundryOperations.applications().get(GetApplicationRequest.builder().name(applicationName).build())).map(ApplicationDetail::getName).as(StepVerifier::create).expectNext(applicationName).expectComplete().verify(Duration.ofMinutes(5));
}
use of org.cloudfoundry.operations.applications.ApplicationDetail in project cf-java-client by cloudfoundry.
the class ApplicationsTest method getStopped.
@Test
public void getStopped() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, true).then(this.cloudFoundryOperations.applications().get(GetApplicationRequest.builder().name(applicationName).build())).map(ApplicationDetail::getName).as(StepVerifier::create).expectNext(applicationName).expectComplete().verify(Duration.ofMinutes(5));
}
use of org.cloudfoundry.operations.applications.ApplicationDetail in project cf-java-client by cloudfoundry.
the class ApplicationsTest method pushUpdateTcpRoute.
@Test
public void pushUpdateTcpRoute() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
String domainName = this.nameFactory.getDomainName();
requestCreateTcpDomain(this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP).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.PROCESS).memory(64).name(applicationName).randomRoute(true).route(Route.builder().route(domainName).build()).build()).noStart(true).build())).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.PROCESS).memory(64).name(applicationName).randomRoute(true).route(Route.builder().route(domainName).build()).build()).noStart(true).build())).then(this.cloudFoundryOperations.applications().get(GetApplicationRequest.builder().name(applicationName).build())).map(ApplicationDetail::getUrls).as(StepVerifier::create).consumeNextWith(routes -> {
assertThat(routes.get(0).matches(domainName + "+?:\\d+$"));
assertThat(routes.get(1).matches(domainName + "+?:\\d+$"));
assertThat(!routes.get(0).matches(routes.get(1)));
}).expectComplete().verify(Duration.ofMinutes(5));
}
Aggregations