> + public void testCreateImageCopyFromLocation() {
> + StringPayload imageData = new StringPayload("");
> + for (String region : api.getConfiguredZones()) {
> + ImageApi imageApi = api.getImageApiForZone(region);
> + ImageDetails details = imageApi.create("jclouds-live-test",
> imageData, diskFormat(DiskFormat.RAW), containerFormat(ContainerFormat.BARE),
> copyFrom("http://10.5.5.121/Installs/Templates/tiny/tinylinux-v2.qcow2"));
> + assertEquals(details.getName(), "jclouds-live-test");
> +
> + Image fromListing = imageApi.get(details.getId());
> +
> + assertEquals(fromListing.getId(), details.getId());
> + assertEquals(fromListing.getSize(), details.getSize());
> + assertEquals(fromListing.getContainerFormat(),
> details.getContainerFormat());
> + assertEquals(fromListing.getDiskFormat(), details.getDiskFormat());
> + assertEquals(fromListing.getSize(), details.getSize());
> +
> + assertTrue(imageApi.delete(details.getId()));
@inbarsto Related to the above comment: if one of the assertions _before_ this
fails, the image may not be cleaned up. Is that correct? If so, add an
`@AfterClass` or so to always try to clean the image up?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/162/files#r18748241