public void testArbitratyImageName() { GoogleComputeEngineImageToImage imageToImage = new GoogleComputeEngineImageToImage(); Image image = imageBuilder.name("arbitratyname").build(); org.jclouds.compute.domain.Image transformed = imageToImage.apply(image); assertEquals(transformed.getName(), image.getName()); assertEquals(transformed.getId(), image.getName()); assertEquals(transformed.getProviderId(), image.getId()); assertSame(transformed.getOperatingSystem().getFamily(), OsFamily.LINUX); }
public void testWellFormedImageName() { GoogleComputeEngineImageToImage imageToImage = new GoogleComputeEngineImageToImage(); Image image = imageBuilder.name("ubuntu-12-04-v123123").build(); org.jclouds.compute.domain.Image transformed = imageToImage.apply(image); assertEquals(transformed.getName(), image.getName()); assertEquals(transformed.getId(), image.getName()); assertEquals(transformed.getProviderId(), image.getId()); assertSame(transformed.getOperatingSystem().getFamily(), OsFamily.UBUNTU); assertEquals(transformed.getOperatingSystem().getVersion(), "12.04"); }