GCE hardware profiles might not have volumes

This commit is contained in:
Ignasi Barrera 2015-09-21 11:03:14 +02:00
parent f69518b752
commit 559f7adb6c
1 changed files with 5 additions and 1 deletions

View File

@ -844,12 +844,16 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte
for (Hardware hardware : client.listHardwareProfiles()) {
assert hardware.getProviderId() != null : hardware;
assert getCores(hardware) > 0 : hardware;
assert hardware.getVolumes().size() >= 0 : hardware;
assert hardware.getRam() > 0 : hardware;
assertEquals(hardware.getType(), ComputeType.HARDWARE);
checkVolumes(hardware);
}
}
protected void checkVolumes(Hardware hardware) {
assert hardware.getVolumes().size() > 0 : hardware;
}
@Test(enabled = true)
public void testCompareSizes() throws Exception {
// Allow to override the comparison but keeping testng dependencies happy