use of org.cloudfoundry.operations.routes.Route in project cf-java-client by cloudfoundry.
the class RoutesTest method unmapTcpRoute.
@Test
public void unmapTcpRoute() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
String domainName = this.nameFactory.getDomainName();
requestCreateApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, true).then(createSharedDomainAndTcpRoute(this.cloudFoundryOperations, domainName, this.spaceName)).flatMap(port -> requestMapRoute(this.cloudFoundryOperations, applicationName, domainName, port)).flatMap(port -> this.cloudFoundryOperations.routes().unmap(UnmapRouteRequest.builder().applicationName(applicationName).domain(domainName).port(port).build())).thenMany(requestListRoutes(this.cloudFoundryOperations)).filter(response -> domainName.equals(response.getDomain())).map(route -> route.getApplications().size()).as(StepVerifier::create).expectNext(0).expectComplete().verify(Duration.ofMinutes(5));
}
Aggregations