updated template expectations

This commit is contained in:
Adrian Cole 2012-05-09 18:20:42 -07:00
parent 9a4e5fd7d8
commit acf1bc2d22
2 changed files with 6 additions and 6 deletions

View File

@ -170,7 +170,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
assert (defaultTemplate.getImage().getProviderId().startsWith("ami-")) : defaultTemplate;
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.03.rc-0");
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.03.1");
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.AMZN_LINUX);
assertEquals(defaultTemplate.getImage().getUserMetadata().get("rootDeviceType"), "ebs");
@ -185,7 +185,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
Template defaultTemplate = view.getComputeService().templateBuilder().osFamily(OsFamily.AMZN_LINUX)
.imageMatches(EC2ImagePredicates.rootDeviceType(RootDeviceType.INSTANCE_STORE)).build();
assert (defaultTemplate.getImage().getProviderId().startsWith("ami-")) : defaultTemplate;
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.03.rc-0");
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.03.1");
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.AMZN_LINUX);
assertEquals(defaultTemplate.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
@ -212,7 +212,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
System.out.println(fastestTemplate.getImage());
assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate;
assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.CC2_8XLARGE);
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "11.10");
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "12.04");
assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "ebs");

View File

@ -53,7 +53,7 @@ public class HPCloudComputeTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.matches("^1[01].*")) && input.is64Bit;
return (input.version.equals("") || input.version.equals("12.04") || input.version.matches("^1[01].*")) && input.is64Bit;
case DEBIAN:
return input.is64Bit && !input.version.equals("5.0");
case CENTOS:
@ -71,9 +71,9 @@ public class HPCloudComputeTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
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().getName(), "Ubuntu Oneiric 11.10 Server 64-bit 20120311");
assertEquals(defaultTemplate.getImage().getName(), "Ubuntu Precise 12.04 LTS Server 64-bit 20120424");
assertEquals(defaultTemplate.getImage().getDefaultCredentials().getUser(), "ubuntu");
assertEquals(defaultTemplate.getLocation().getId(), "az-2.region-a.geo-1");
assertEquals(defaultTemplate.getImage().getLocation().getId(), "az-2.region-a.geo-1");