public OperatingSystem build() { return new OperatingSystem(family, name, version, arch, description, is64Bit); }
public OperatingSystem build() { return new OperatingSystem(family, name, version, arch, description, is64Bit); }
public OperatingSystem build() { return new OperatingSystem(family, name, version, arch, description, is64Bit); }
@Override public OperatingSystem getOperatingSystem() { return new OperatingSystem(osFamily, "", version, "", "", true); }
public void testRedHatEnterpriseLinuxDescriptionSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "", null, null, "Red Hat Enterprise Linux", false)); } }
public void testFedoraTypeSupportsYum() { assert supportsYum().apply(new OperatingSystem(OsFamily.FEDORA, null, "", null, "description", false)); }
public void testFedoraNameSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "Fedora", "", null, "description", false)); }
public void testSuseNameSupportsZypper() { assert supportsZypper().apply(new OperatingSystem(null, "Suse", "", null, "description", false)); }
public void testRhelTypeSupportsYum() { assert supportsYum().apply(new OperatingSystem(OsFamily.RHEL, null, "", null, "description", false)); }
public void testFedoraDescriptionSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "", null, null, "Fedora", false)); }
public void testUbuntuNameSupportsApt() { assert supportsApt().apply(new OperatingSystem(null, "Ubuntu", "", null, "description", false)); }
public void testSuseTypeSupportsZypper() { assert supportsZypper().apply(new OperatingSystem(OsFamily.SUSE, null, "", null, "description", false)); }
public void testRhelNameSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "RHEL", "", null, "description", false)); }
public void testRedHatEnterpriseLinuxNameSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "Red Hat Enterprise Linux", "", null, "description", false)); }
public void testSuseDescriptionSupportsZypper() { assert supportsZypper().apply(new OperatingSystem(null, "", null, null, "Suse", false)); }
public void testCentosNameSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "Centos", "", null, "description", false)); }
public void testRhelDescriptionSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "", null, null, "RHEL", false)); }
@Test(expectedExceptions = IllegalStateException.class) public void testConversionWhereLocationNotFound() { UUID id = UUID.randomUUID(); Image novaImageToConvert = Image.builder().id(id.toString()).name("Test Image " + id).build(); OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86", "My Test OS", true); ImageInZoneToImage converter = new ImageInZoneToImage(NovaComputeServiceContextModule.toPortableImageStatus, constant(operatingSystem), locationIndex); ImageInZone novaImageInZoneToConvert = new ImageInZone(novaImageToConvert, "South"); converter.apply(novaImageInZoneToConvert); }
@Test(expectedExceptions = IllegalStateException.class) public void testConversionWhereLocationNotFound() { UUID id = UUID.randomUUID(); Image novaImageToConvert = Image.builder().id(id.toString()).name("Test Image " + id).build(); OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86", "My Test OS", true); ImageInRegionToImage converter = new ImageInRegionToImage(NovaComputeServiceContextModule.toPortableImageStatus, constant(operatingSystem), locationIndex); ImageInRegion novaImageInRegionToConvert = new ImageInRegion(novaImageToConvert, "South"); converter.apply(novaImageInRegionToConvert); }
/** * Ensures that an explicitly set null Image description results in no errors. */ public void testNullDescription() { Image img = new ImageBuilder().id("test-id") .description(null) .status(Status.AVAILABLE) .operatingSystem(new OperatingSystem(OsFamily.CLOUD_LINUX, null, null, null, "os-description", true)) .build(); assertNull(img.getDescription()); } }