> +      assertNull(api().inspectImage(image.getId()));
> +   }
> +
> +   @Test(dependsOnMethods = "testDeleteImage")
> +   public void testBuildImage() throws IOException, InterruptedException, 
> URISyntaxException {
> +      BuildOptions options = 
> BuildOptions.Builder.tag("testBuildImage").verbose(false).nocache(false);
> +      InputStream buildImageStream = api().build(new 
> File(Resources.getResource("centos/Dockerfile").toURI()), options);
> +      String buildStream = consumeStream(buildImageStream, false);
> +      Iterable<String> splitted = 
> Splitter.on("\n").split(buildStream.replace("\r", "").trim());
> +      String lastStreamedLine = Iterables.getLast(splitted).trim();
> +      String rawImageId = Iterables.getLast(Splitter.on("Successfully built 
> ").split(lastStreamedLine));
> +      String imageId = rawImageId.substring(0, 11);
> +      Image image = api().inspectImage(imageId);
> +      api().removeContainer(image.getContainer());
> +      api().deleteImage(imageId, DeleteImageOptions.Builder.force(true));
> +   }

There are still methods int he RemoteApi that don't have the corresponding live 
test. They must be added.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/57/files#r12937868

Reply via email to