fixed cloudservers expectations

This commit is contained in:
Adrian Cole 2012-06-01 12:58:44 -07:00
parent 160cd273e2
commit f122aeadd8
1 changed files with 3 additions and 3 deletions

View File

@ -52,12 +52,12 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public boolean apply(OsFamilyVersion64Bit input) { public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) { switch (input.family) {
case UBUNTU: case UBUNTU:
return (input.version.equals("") || input.version.equals("10.04") || input.version.startsWith("11")) return (input.version.equals("") || input.version.matches("1[012].04") || input.version.startsWith("11"))
&& input.is64Bit; && input.is64Bit;
case DEBIAN: case DEBIAN:
return input.is64Bit && !input.version.equals("5.0"); return input.is64Bit && !input.version.equals("5.0");
case CENTOS: case CENTOS:
return (input.version.equals("") || input.version.equals("5.6") || input.version.equals("6.0")) return (input.version.equals("") || input.version.matches("5.[60]") || input.version.equals("6.0"))
&& input.is64Bit; && input.is64Bit;
case WINDOWS: case WINDOWS:
return input.version.equals("2008 SP2") || input.version.equals("") return input.version.equals("2008 SP2") || input.version.equals("")
@ -74,7 +74,7 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public void testTemplateBuilder() { public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build(); Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "12.04");
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
assertEquals(defaultTemplate.getLocation().getId(), provider); assertEquals(defaultTemplate.getLocation().getId(), provider);
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d); assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);