Updates the default template so live tests pass again.

This commit is contained in:
Zack Shoylev 2016-11-18 22:53:18 -06:00
parent 5a3cfe5dbe
commit 301f6812af
4 changed files with 5 additions and 5 deletions

View File

@ -80,9 +80,9 @@ public class ImageToOperatingSystem implements Function<Image, OperatingSystem>
is64Bit = matcher.group(2).equals("x64");
}
} else {
if (imageName.contains("Red Hat EL")) {
if (imageName.contains("Red Hat")) {
osFamily = OsFamily.RHEL;
} else if (imageName.contains("Oracle EL")) {
} else if (imageName.contains("Oracle")) {
osFamily = OsFamily.OEL;
} else {
final Iterable<String> imageNameParts = Splitter.on(CharMatcher.WHITESPACE).trimResults().split(

View File

@ -87,7 +87,7 @@ public final class ComputeServiceConstants {
@Named(OS_VERSION_MAP_JSON)
// TODO: switch this to read from resource, failing back to string
// constant on classpath problem
public String osVersionMapJson = "{\"suse\":{\"\":\"\",\"11\":\"11\",\"11 SP1\":\"11 SP1\"},\"debian\":{\"\":\"\",\"lenny\":\"5.0\",\"6\":\"6.0\",\"squeeze\":\"6.0\"},\"centos\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\",\"5.6\":\"5.6\",\"5.7\":\"5.7\",\"6\":\"6.0\",\"6.0\":\"6.0\",\"6.2\":\"6.2\",\"6.3\":\"6.3\",\"6.4\":\"6.4\",\"6.5\":\"6.5\",\"6.6\":\"6.6\",\"7.0\":\"7.0\"},\"rhel\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\",\"5.6\":\"5.6\",\"5.7\":\"5.7\",\"6\":\"6.0\",\"6.0\":\"6.0\",\"6.1\":\"6.1\",\"6.3\":\"6.3\",\"6.4\":\"6.4\",\"6.5\":\"6.5\",\"6.6\":\"6.6\",\"7.0\":\"7.0\"},\"solaris\":{\"\":\"\",\"10\":\"10\"},\"ubuntu\":{\"\":\"\",\"hardy\":\"8.04\",\"karmic\":\"9.10\",\"lucid\":\"10.04\",\"10.04.1\":\"10.04\",\"maverick\":\"10.10\",\"natty\":\"11.04\",\"oneiric\":\"11.10\",\"precise\":\"12.04\",\"quantal\":\"12.10\",\"raring\":\"13.04\",\"saucy\":\"13.10\",\"trusty\":\"14.04\",\"utopic\":\"14.10\",\"vivid\":\"15.04\",\"wily\":\"15.10\"},\"windows\":{\"\":\"\",\"7\":\"7\",\"2003\":\"2003\",\"2003 Standard\":\"2003\",\"2003 R2\":\"2003 R2\",\"2008\":\"2008\",\"2008 Web\":\"2008\",\"2008 Server\":\"2008\",\"Server 2008\":\"2008\",\"2008 R1\":\"2008 R1\",\"2008 R2\":\"2008 R2\",\"Server 2008 R2\":\"2008 R2\",\"2008 Server R2\":\"2008 R2\",\"2008 SP2\":\"2008 SP2\",\"Server 2008 SP2\":\"2008 SP2\"}}";
public String osVersionMapJson = "{\"suse\":{\"\":\"\",\"11\":\"11\",\"11 SP1\":\"11 SP1\"},\"debian\":{\"\":\"\",\"lenny\":\"5.0\",\"6\":\"6.0\",\"squeeze\":\"6.0\"},\"centos\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\",\"5.6\":\"5.6\",\"5.7\":\"5.7\",\"6\":\"6.0\",\"6.0\":\"6.0\",\"6.2\":\"6.2\",\"6.3\":\"6.3\",\"6.4\":\"6.4\",\"6.5\":\"6.5\",\"6.6\":\"6.6\",\"7\":\"7.0\",\"7.0\":\"7.0\"},\"rhel\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\",\"5.6\":\"5.6\",\"5.7\":\"5.7\",\"6\":\"6.0\",\"6.0\":\"6.0\",\"6.1\":\"6.1\",\"6.3\":\"6.3\",\"6.4\":\"6.4\",\"6.5\":\"6.5\",\"6.6\":\"6.6\",\"7\":\"7.0\",\"7.0\":\"7.0\"},\"solaris\":{\"\":\"\",\"10\":\"10\"},\"ubuntu\":{\"\":\"\",\"hardy\":\"8.04\",\"karmic\":\"9.10\",\"lucid\":\"10.04\",\"10.04.1\":\"10.04\",\"maverick\":\"10.10\",\"natty\":\"11.04\",\"oneiric\":\"11.10\",\"precise\":\"12.04\",\"quantal\":\"12.10\",\"raring\":\"13.04\",\"saucy\":\"13.10\",\"trusty\":\"14.04\",\"utopic\":\"14.10\",\"vivid\":\"15.04\",\"wily\":\"15.10\",\"xenial\":\"16.04\",\"yakkety\":\"16.10\",\"zesty\":\"17.04\"},\"windows\":{\"\":\"\",\"7\":\"7\",\"2003\":\"2003\",\"2003 Standard\":\"2003\",\"2003 R2\":\"2003 R2\",\"2008\":\"2008\",\"2008 Web\":\"2008\",\"2008 Server\":\"2008\",\"Server 2008\":\"2008\",\"2008 R1\":\"2008 R1\",\"2008 R2\":\"2008 R2\",\"Server 2008 R2\":\"2008 R2\",\"2008 Server R2\":\"2008 R2\",\"2008 SP2\":\"2008 SP2\",\"Server 2008 SP2\":\"2008 SP2\"}}";
}
@Singleton

View File

@ -90,7 +90,7 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont
@Test
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
assertTrue(defaultTemplate.getImage().getOperatingSystem().getVersion().matches("\\d\\d\\.\\d\\d"),
assertTrue(defaultTemplate.getImage().getOperatingSystem().getVersion().matches("\\d+\\.\\d+"),
"Version mismatch, expected dd.dd, found: " + defaultTemplate.getImage().getOperatingSystem().getVersion());
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);

View File

@ -76,7 +76,7 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata {
* Debian - script problems
* Ubuntu - script problems
* */
properties.setProperty(TEMPLATE, "imageNameMatches=.*CentOS.*7.*,os64Bit=true");
properties.setProperty(TEMPLATE, "imageNameMatches=.*Ubuntu.*,os64Bit=true");
return properties;
}