use of reactor.test.StepVerifier in project cf-java-client by cloudfoundry.
the class ApplicationsTest method startStarted.
@Test
public void startStarted() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, false).then(this.cloudFoundryOperations.applications().start(StartApplicationRequest.builder().name(applicationName).build())).as(StepVerifier::create).expectComplete().verify(Duration.ofMinutes(5));
}
use of reactor.test.StepVerifier in project cf-java-client by cloudfoundry.
the class ApplicationsTest method pushExisting.
@Test
public void pushExisting() throws IOException {
String applicationName = this.nameFactory.getApplicationName();
createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, false).then(this.cloudFoundryOperations.applications().push(PushApplicationRequest.builder().path(new ClassPathResource("test-application.zip").getFile().toPath()).buildpack("staticfile_buildpack").diskQuota(512).memory(64).name(applicationName).build())).as(StepVerifier::create).expectComplete().verify(Duration.ofMinutes(5));
}
use of reactor.test.StepVerifier 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));
}
use of reactor.test.StepVerifier in project cf-java-client by cloudfoundry.
the class BuildpacksTest method updateFromDirectory.
@Test
public void updateFromDirectory() throws IOException {
String buildpackName = this.nameFactory.getBuildpackName();
createBuildpack(this.cloudFoundryOperations, buildpackName).then(this.cloudFoundryOperations.buildpacks().update(UpdateBuildpackRequest.builder().buildpack(new ClassPathResource("test-buildpack").getFile().toPath()).enable(true).name(buildpackName).build())).thenMany(this.cloudFoundryOperations.buildpacks().list()).filter(buildpack -> buildpackName.equals(buildpack.getName())).map(Buildpack::getFilename).as(StepVerifier::create).expectNext("test-buildpack.zip").expectComplete().verify(Duration.ofMinutes(5));
}
use of reactor.test.StepVerifier in project spring-security by spring-projects.
the class R2dbcReactiveOAuth2AuthorizedClientServiceTests method removeAuthorizedClientWhenExistsThenRemoved.
@Test
public void removeAuthorizedClientWhenExistsThenRemoved() {
Authentication principal = createPrincipal();
OAuth2AuthorizedClient authorizedClient = createAuthorizedClient(principal, this.clientRegistration);
this.authorizedClientService.saveAuthorizedClient(authorizedClient, principal).as(StepVerifier::create).verifyComplete();
this.authorizedClientService.loadAuthorizedClient(this.clientRegistration.getRegistrationId(), principal.getName()).as(StepVerifier::create).assertNext((dbAuthorizedClient) -> assertThat(dbAuthorizedClient).isNotNull()).verifyComplete();
this.authorizedClientService.removeAuthorizedClient(this.clientRegistration.getRegistrationId(), principal.getName()).as(StepVerifier::create).verifyComplete();
this.authorizedClientService.loadAuthorizedClient(this.clientRegistration.getRegistrationId(), principal.getName()).as(StepVerifier::create).expectNextCount(0).verifyComplete();
}
Aggregations