From 042222b647146a7dd606ab533504a72e5c2d4bc4 Mon Sep 17 00:00:00 2001 From: Ignasi Barrera Date: Thu, 17 Sep 2015 00:29:06 +0200 Subject: [PATCH] GCE hardware profiles might not have volumes --- .../compute/internal/BaseComputeServiceLiveTest.java | 6 +++++- .../compute/GoogleComputeEngineServiceLiveTest.java | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java index f1af0b1838..4a9df54254 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java @@ -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 { diff --git a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java index afaa5bbd70..804e6e8555 100644 --- a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java +++ b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java @@ -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. + } + }