public static Statement installJavaAndCurl(OperatingSystem os) { if (os == null || OperatingSystemPredicates.supportsApt().apply(os)) return APT_RUN_SCRIPT; else if (OperatingSystemPredicates.supportsYum().apply(os)) return YUM_RUN_SCRIPT; else if (OperatingSystemPredicates.supportsZypper().apply(os)) return ZYPPER_RUN_SCRIPT; else throw new IllegalArgumentException("don't know how to handle" + os.toString()); }
public void testCIMDEBIANDoesntSupportYum() { assert !supportsYum().apply(new CIMOperatingSystem(OSType.DEBIAN, "", null, "description")); assert !supportsYum().apply(new CIMOperatingSystem(OSType.DEBIAN_64, "", null, "description")); }
public void testRedHatEnterpriseLinuxDescriptionSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "", null, null, "Red Hat Enterprise Linux", false)); } }
public void testCIMCENTOSSupportsYum() { assert supportsYum().apply(new CIMOperatingSystem(OSType.CENTOS, "", null, "description")); assert supportsYum().apply(new CIMOperatingSystem(OSType.CENTOS_64, "", null, "description")); }
public void testCIMRHELSupportsYum() { assert supportsYum().apply(new CIMOperatingSystem(OSType.RHEL, "", null, "description")); assert supportsYum().apply(new CIMOperatingSystem(OSType.RHEL_64, "", null, "description")); }
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 testCIMUBUNTUDoesntSupportYum() { assert !supportsYum().apply(new CIMOperatingSystem(OSType.UBUNTU, "", null, "description")); assert !supportsYum().apply(new CIMOperatingSystem(OSType.UBUNTU_64, "", null, "description")); }
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 testCentosNameSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "Centos", "", null, "description", false)); }
public void testCentosTypeSupportsYum() { assert supportsYum().apply(new OperatingSystem(OsFamily.CENTOS, null, "", null, "description", false)); }
public void testAmzTypeSupportsYum() { assert supportsYum().apply(new OperatingSystem(OsFamily.AMZN_LINUX, null, "", null, "description", false)); }
public void testCentosNameSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "Centos", "", null, "description", false)); }
public void testCentosDescriptionSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "", null, null, "Centos", false)); }
public void testRhelDescriptionSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "", null, null, "RHEL", false)); }
public void testCIMUBUNTUDoesntSupportYum() { assert !supportsYum().apply(new CIMOperatingSystem(OSType.UBUNTU, "", null, "description")); assert !supportsYum().apply(new CIMOperatingSystem(OSType.UBUNTU_64, "", null, "description")); }
public void testFedoraNameSupportsYum() { assert supportsYum().apply(new OperatingSystem(null, "Fedora", "", null, "description", 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)); }