From 6d46ba7fb52aa998d47f8d5c806dca96719d6aef Mon Sep 17 00:00:00 2001 From: Jason King Date: Wed, 9 Nov 2011 15:16:03 +0000 Subject: [PATCH] Issue 695: Changed terremark endpoint to beta site. Re-used BaseVersionedServiceLiveTest from previous commit --- sandbox-providers/trmk-enterprisecloud/pom.xml | 6 +++--- ...remarkEnterpriseCloudPropertiesBuilder.java | 3 +-- ...TerremarkEnterpriseCloudClientLiveTest.java | 18 ++++++++++-------- .../features/TaskClientLiveTest.java | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/sandbox-providers/trmk-enterprisecloud/pom.xml b/sandbox-providers/trmk-enterprisecloud/pom.xml index 346302da5b..4741c64504 100644 --- a/sandbox-providers/trmk-enterprisecloud/pom.xml +++ b/sandbox-providers/trmk-enterprisecloud/pom.xml @@ -48,10 +48,10 @@ - http://209.251.187.125/livespec + https://services-beta.enterprisecloud.terremark.com/cloudapi 2011-07-01 - readonly@terremark.com - T3rr3m@rk + FIXME + FIXME diff --git a/sandbox-providers/trmk-enterprisecloud/src/main/java/org/jclouds/trmk/enterprisecloud/TerremarkEnterpriseCloudPropertiesBuilder.java b/sandbox-providers/trmk-enterprisecloud/src/main/java/org/jclouds/trmk/enterprisecloud/TerremarkEnterpriseCloudPropertiesBuilder.java index 8c50bb1a92..cdf78549e2 100644 --- a/sandbox-providers/trmk-enterprisecloud/src/main/java/org/jclouds/trmk/enterprisecloud/TerremarkEnterpriseCloudPropertiesBuilder.java +++ b/sandbox-providers/trmk-enterprisecloud/src/main/java/org/jclouds/trmk/enterprisecloud/TerremarkEnterpriseCloudPropertiesBuilder.java @@ -34,8 +34,7 @@ public class TerremarkEnterpriseCloudPropertiesBuilder extends PropertiesBuilder @Override protected Properties defaultProperties() { Properties properties = super.defaultProperties(); - // TODO replace with the actual rest url - properties.setProperty(PROPERTY_ENDPOINT, "http://209.251.187.125/livespec"); + properties.setProperty(PROPERTY_ENDPOINT, "https://services-beta.enterprisecloud.terremark.com/cloudapi"); properties.setProperty(PROPERTY_API_VERSION, "2011-07-01"); return properties; } diff --git a/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/BaseTerremarkEnterpriseCloudClientLiveTest.java b/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/BaseTerremarkEnterpriseCloudClientLiveTest.java index d51c6d13fc..27bc89286e 100644 --- a/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/BaseTerremarkEnterpriseCloudClientLiveTest.java +++ b/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/BaseTerremarkEnterpriseCloudClientLiveTest.java @@ -20,6 +20,7 @@ package org.jclouds.trmk.enterprisecloud.features; import java.util.Properties; +import org.jclouds.compute.BaseVersionedServiceLiveTest; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.jclouds.rest.RestContextFactory; @@ -39,21 +40,22 @@ import com.google.inject.Module; * @author Adrian Cole */ @Test(groups = "live") -public class BaseTerremarkEnterpriseCloudClientLiveTest { +public class BaseTerremarkEnterpriseCloudClientLiveTest extends BaseVersionedServiceLiveTest { protected RestContext context; protected Module module; + public BaseTerremarkEnterpriseCloudClientLiveTest() { + provider = "trmk-enterprisecloud"; + } + @BeforeGroups(groups = { "live" }) public void setupClient() { - // TODO organize this like other compute tests - String identity = System.getProperty("test.trmk-enterprisecloud.identity", "readonly@terremark.com"); - String credential = System.getProperty("test.trmk-enterprisecloud.credential", "T3rr3m@rk"); + setupCredentials(); + Properties overrides = setupProperties(); - Properties props = new Properties(); - - context = new RestContextFactory().createContext("trmk-enterprisecloud", identity, credential, - ImmutableSet. of(new Log4JLoggingModule(), new SshjSshClientModule()), props); + context = new RestContextFactory().createContext(provider, identity, credential, + ImmutableSet. of(new Log4JLoggingModule(), new SshjSshClientModule()), overrides); } @AfterGroups(groups = "live") diff --git a/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/TaskClientLiveTest.java b/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/TaskClientLiveTest.java index 09cd937d64..775266d59c 100644 --- a/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/TaskClientLiveTest.java +++ b/sandbox-providers/trmk-enterprisecloud/src/test/java/org/jclouds/trmk/enterprisecloud/features/TaskClientLiveTest.java @@ -47,7 +47,7 @@ public class TaskClientLiveTest extends BaseTerremarkEnterpriseCloudClientLiveTe // TODO: don't hard-code id // TODO: docs say don't parse the href, yet no xml includes "identifier", // I suspect we may need to change to URI args as opposed to long - Set response = client.getTasksInEnvironment(1); + Set response = client.getTasksInEnvironment(77); assert null != response; assertTrue(response.size() >= 0);