Fix a bunch of aws-ec2 live tests

This commit is contained in:
Ignasi Barrera 2015-10-29 01:25:49 +01:00
parent 985d45122b
commit c9306c1fc8
3 changed files with 8 additions and 4 deletions

View File

@ -69,6 +69,11 @@ public class AWSEC2ComputeServiceLiveTest extends EC2ComputeServiceLiveTest {
group = "ec2";
}
@Override
protected void checkVolumes(Hardware hardware) {
// Not all hardware profiles define volumes. Don't check their size
}
@Override
@Test
public void testExtendedOptionsAndLogin() throws Exception {

View File

@ -159,7 +159,6 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
Template defaultTemplate = view.getComputeService().templateBuilder().osFamily(AMZN_LINUX)
.imageMatches(EC2ImagePredicates.rootDeviceType(RootDeviceType.INSTANCE_STORE)).build();
assert defaultTemplate.getImage().getProviderId().startsWith("ami-") : defaultTemplate;
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2015.03.rc-1");
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), AMZN_LINUX);
assertEquals(defaultTemplate.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
@ -173,7 +172,6 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
Template fastestTemplate = view.getComputeService().templateBuilder().fastest().osFamily(AMZN_LINUX).build();
assert fastestTemplate.getImage().getProviderId().startsWith("ami-") : fastestTemplate;
assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.C4_8XLARGE);
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "2011.09.2");
assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), AMZN_LINUX);
assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "ebs");
@ -291,7 +289,6 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
Template template = context.getComputeService().templateBuilder().imageId("eu-west-1/ami-a33b06d7").build();
assert template.getImage().getProviderId().startsWith("ami-") : template;
assertEquals(template.getImage().getOperatingSystem().getVersion(), "2011.09.2");
assertEquals(template.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(template.getImage().getOperatingSystem().getFamily(), AMZN_LINUX);
assertEquals(template.getImage().getVersion(), "2011.09.2");

View File

@ -52,7 +52,9 @@ public class AWSInstanceApiLiveTest extends BaseComputeServiceContextLiveTest {
for (String region : view.unwrapApi(AWSEC2Api.class).getAvailabilityZoneAndRegionApi().get().describeRegions().keySet()) {
Set<? extends Reservation<? extends RunningInstance>> allResults = client.describeInstancesInRegion(region);
assertNotNull(allResults);
assert allResults.size() > 0 : allResults.size();
for (Reservation<? extends RunningInstance> result : allResults) {
assertNotNull(result.getReservationId());
}
}
}
}