GCE hardware profiles might not have volumes

This commit is contained in:
Ignasi Barrera 2015-09-17 00:29:06 +02:00
parent f8eff7e00e
commit 042222b647
2 changed files with 10 additions and 1 deletions

View File

@ -844,11 +844,15 @@ 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 {

View File

@ -146,4 +146,9 @@ public class GoogleComputeEngineServiceLiveTest extends BaseComputeServiceLiveTe
return path.substring(path.lastIndexOf('/') + 1);
}
@Override
protected void checkVolumes(Hardware hardware) {
// Hardware profiles might not have volumes.
}
}