use of org.cloudfoundry.operations.buildpacks.Buildpack 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));
}
Aggregations