use of org.cloudfoundry.util.ResourceUtils in project cf-java-client by cloudfoundry.
the class BuildpacksTest method uploadDirectory.
@Test
public void uploadDirectory() throws IOException {
Path buildpack = new ClassPathResource("test-buildpack").getFile().toPath();
String buildpackName = this.nameFactory.getBuildpackName();
String filename = buildpack.getFileName().toString();
createBuildpackId(this.cloudFoundryClient, buildpackName).flatMap(buildpackId -> this.cloudFoundryClient.buildpacks().upload(UploadBuildpackRequest.builder().buildpack(buildpack).buildpackId(buildpackId).filename(filename).build())).map(ResourceUtils::getEntity).as(StepVerifier::create).expectNext(BuildpackEntity.builder().enabled(false).filename(filename + ".zip").locked(false).name(buildpackName).position(3).build()).expectComplete().verify(Duration.ofMinutes(5));
}
use of org.cloudfoundry.util.ResourceUtils in project cf-java-client by cloudfoundry.
the class BuildpacksTest method upload.
@Test
public void upload() throws IOException {
Path buildpack = new ClassPathResource("test-buildpack.zip").getFile().toPath();
String buildpackName = this.nameFactory.getBuildpackName();
createBuildpackId(this.cloudFoundryClient, buildpackName).flatMap(buildpackId -> this.cloudFoundryClient.buildpacks().upload(UploadBuildpackRequest.builder().buildpack(buildpack).buildpackId(buildpackId).filename(buildpack.getFileName().toString()).build())).map(ResourceUtils::getEntity).as(StepVerifier::create).expectNext(BuildpackEntity.builder().enabled(false).filename(buildpack.getFileName().toString()).locked(false).name(buildpackName).position(3).build()).expectComplete().verify(Duration.ofMinutes(5));
}
Aggregations