Issue 695: Changed terremark endpoint to beta site. Re-used BaseVersionedServiceLiveTest from previous commit

This commit is contained in:
Jason King 2011-11-09 15:16:03 +00:00
parent 98e7c6047c
commit 6d46ba7fb5
4 changed files with 15 additions and 14 deletions

View File

@ -48,10 +48,10 @@
</repositories>
<properties>
<test.trmk-enterprisecloud.endpoint>http://209.251.187.125/livespec</test.trmk-enterprisecloud.endpoint>
<test.trmk-enterprisecloud.endpoint>https://services-beta.enterprisecloud.terremark.com/cloudapi</test.trmk-enterprisecloud.endpoint>
<test.trmk-enterprisecloud.apiversion>2011-07-01</test.trmk-enterprisecloud.apiversion>
<test.trmk-enterprisecloud.identity>readonly@terremark.com</test.trmk-enterprisecloud.identity>
<test.trmk-enterprisecloud.credential>T3rr3m@rk</test.trmk-enterprisecloud.credential>
<test.trmk-enterprisecloud.identity>FIXME</test.trmk-enterprisecloud.identity>
<test.trmk-enterprisecloud.credential>FIXME</test.trmk-enterprisecloud.credential>
</properties>
<dependencies>
<dependency>

View File

@ -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;
}

View File

@ -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<TerremarkEnterpriseCloudClient, TerremarkEnterpriseCloudAsyncClient> 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.<Module> of(new Log4JLoggingModule(), new SshjSshClientModule()), props);
context = new RestContextFactory().createContext(provider, identity, credential,
ImmutableSet.<Module> of(new Log4JLoggingModule(), new SshjSshClientModule()), overrides);
}
@AfterGroups(groups = "live")

View File

@ -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<Task> response = client.getTasksInEnvironment(1);
Set<Task> response = client.getTasksInEnvironment(77);
assert null != response;
assertTrue(response.size() >= 0);