From 1a9d17470395ee96918834498e912e7cf6607aee Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Tue, 26 Jul 2011 22:16:32 -0700 Subject: [PATCH] fixed Bluelock tests --- .../BluelockVCloudDirectorComputeServiceLiveTest.java | 8 +++++++- .../BluelockVCloudEnterpriseComputeServiceLiveTest.java | 8 +++++++- .../BluelockVCloudZone01ComputeServiceLiveTest.java | 7 +++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/providers/bluelock-vcdirector/src/test/java/org/jclouds/vcloud/bluelock/compute/BluelockVCloudDirectorComputeServiceLiveTest.java b/providers/bluelock-vcdirector/src/test/java/org/jclouds/vcloud/bluelock/compute/BluelockVCloudDirectorComputeServiceLiveTest.java index 00dc577a1a..6961bb1b62 100644 --- a/providers/bluelock-vcdirector/src/test/java/org/jclouds/vcloud/bluelock/compute/BluelockVCloudDirectorComputeServiceLiveTest.java +++ b/providers/bluelock-vcdirector/src/test/java/org/jclouds/vcloud/bluelock/compute/BluelockVCloudDirectorComputeServiceLiveTest.java @@ -21,7 +21,9 @@ package org.jclouds.vcloud.bluelock.compute; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.testng.Assert.assertEquals; +import org.jclouds.compute.domain.ExecResponse; import org.jclouds.compute.domain.Image; +import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.OsFamily; import org.jclouds.compute.domain.Template; import org.jclouds.compute.domain.TemplateBuilder; @@ -66,5 +68,9 @@ public class BluelockVCloudDirectorComputeServiceLiveTest extends VCloudComputeS assert image.getDefaultCredentials().credential != null : image; return template; } - + + protected void checkResponseEqualsHostname(ExecResponse execResponse, NodeMetadata node1) { + // hostname is not completely predictable based on node metadata + assert execResponse.getOutput().trim().equals("Ubuntu1004") : execResponse + ": " + node1; + } } diff --git a/providers/bluelock-vcloud-vcenterprise/src/test/java/org/jclouds/bluelock/vcloud/vcenterprise/compute/BluelockVCloudEnterpriseComputeServiceLiveTest.java b/providers/bluelock-vcloud-vcenterprise/src/test/java/org/jclouds/bluelock/vcloud/vcenterprise/compute/BluelockVCloudEnterpriseComputeServiceLiveTest.java index 4a5bef6593..6fed45edb3 100644 --- a/providers/bluelock-vcloud-vcenterprise/src/test/java/org/jclouds/bluelock/vcloud/vcenterprise/compute/BluelockVCloudEnterpriseComputeServiceLiveTest.java +++ b/providers/bluelock-vcloud-vcenterprise/src/test/java/org/jclouds/bluelock/vcloud/vcenterprise/compute/BluelockVCloudEnterpriseComputeServiceLiveTest.java @@ -21,7 +21,9 @@ package org.jclouds.bluelock.vcloud.vcenterprise.compute; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.testng.Assert.assertEquals; +import org.jclouds.compute.domain.ExecResponse; import org.jclouds.compute.domain.Image; +import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.OsFamily; import org.jclouds.compute.domain.Template; import org.jclouds.compute.domain.TemplateBuilder; @@ -66,5 +68,9 @@ public class BluelockVCloudEnterpriseComputeServiceLiveTest extends VCloudComput assert image.getDefaultCredentials().credential != null : image; return template; } - + + protected void checkResponseEqualsHostname(ExecResponse execResponse, NodeMetadata node1) { + // hostname is not completely predictable based on node metadata + assert execResponse.getOutput().trim().equals("Ubuntu1004") : execResponse + ": " + node1; + } } diff --git a/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01ComputeServiceLiveTest.java b/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01ComputeServiceLiveTest.java index edc603e0dd..26cfbbd81b 100644 --- a/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01ComputeServiceLiveTest.java +++ b/providers/bluelock-vcloud-zone01/src/test/java/org/jclouds/bluelock/vcloud/zone01/compute/BluelockVCloudZone01ComputeServiceLiveTest.java @@ -21,7 +21,9 @@ package org.jclouds.bluelock.vcloud.zone01.compute; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.testng.Assert.assertEquals; +import org.jclouds.compute.domain.ExecResponse; import org.jclouds.compute.domain.Image; +import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.OsFamily; import org.jclouds.compute.domain.Template; import org.jclouds.compute.domain.TemplateBuilder; @@ -66,5 +68,10 @@ public class BluelockVCloudZone01ComputeServiceLiveTest extends VCloudComputeSer assert image.getDefaultCredentials().credential != null : image; return template; } + + protected void checkResponseEqualsHostname(ExecResponse execResponse, NodeMetadata node1) { + // hostname is not completely predictable based on node metadata + assert execResponse.getOutput().trim().equals("Ubuntu1004") : execResponse + ": " + node1; + } }