mirror of https://github.com/apache/jclouds.git
fixed broked live tests
This commit is contained in:
parent
f4b0ce9b7d
commit
044ffc8563
|
@ -89,7 +89,7 @@ public class EC2TemplateBuilderLiveTest {
|
||||||
assertEquals(template.getImage().getOperatingSystem().getVersion(), "10.10");
|
assertEquals(template.getImage().getOperatingSystem().getVersion(), "10.10");
|
||||||
assertEquals(template.getImage().getOperatingSystem().is64Bit(), false);
|
assertEquals(template.getImage().getOperatingSystem().is64Bit(), false);
|
||||||
assertEquals(template.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
assertEquals(template.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||||
assertEquals(template.getImage().getVersion(), "20101027");
|
assertEquals(template.getImage().getVersion(), "20101106");
|
||||||
assertEquals(template.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
|
assertEquals(template.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
|
||||||
assertEquals(template.getLocation().getId(), "us-east-1");
|
assertEquals(template.getLocation().getId(), "us-east-1");
|
||||||
assertEquals(getCores(template.getHardware()), 1.0d);
|
assertEquals(getCores(template.getHardware()), 1.0d);
|
||||||
|
|
|
@ -45,6 +45,12 @@ public class EucalyptusComputeServiceLiveTest extends EC2ComputeServiceLiveTest
|
||||||
tag = "euc";
|
tag = "euc";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Test(enabled = false)
|
||||||
|
public void testExtendedOptionsAndLogin() throws Exception {
|
||||||
|
// euc does not support monitoring
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void assertDefaultWorks() {
|
protected void assertDefaultWorks() {
|
||||||
Template defaultTemplate = client.templateBuilder().build();
|
Template defaultTemplate = client.templateBuilder().build();
|
||||||
|
|
|
@ -36,12 +36,13 @@ import org.jclouds.aws.domain.Region;
|
||||||
import org.jclouds.aws.ec2.EC2AsyncClient;
|
import org.jclouds.aws.ec2.EC2AsyncClient;
|
||||||
import org.jclouds.aws.ec2.EC2Client;
|
import org.jclouds.aws.ec2.EC2Client;
|
||||||
import org.jclouds.aws.ec2.domain.Image;
|
import org.jclouds.aws.ec2.domain.Image;
|
||||||
import org.jclouds.aws.ec2.domain.RootDeviceType;
|
|
||||||
import org.jclouds.aws.ec2.domain.Image.ImageType;
|
import org.jclouds.aws.ec2.domain.Image.ImageType;
|
||||||
|
import org.jclouds.aws.ec2.domain.RootDeviceType;
|
||||||
import org.jclouds.compute.ComputeServiceContextFactory;
|
import org.jclouds.compute.ComputeServiceContextFactory;
|
||||||
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
||||||
import org.jclouds.rest.RestContext;
|
import org.jclouds.rest.RestContext;
|
||||||
import org.testng.annotations.AfterTest;
|
import org.testng.annotations.AfterTest;
|
||||||
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeGroups;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@ -74,13 +75,12 @@ public class AMIClientLiveTest {
|
||||||
protected String endpoint;
|
protected String endpoint;
|
||||||
protected String apiversion;
|
protected String apiversion;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
protected void setupCredentials() {
|
protected void setupCredentials() {
|
||||||
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
||||||
credential = checkNotNull(System.getProperty("test." + provider + ".credential"), "test." + provider
|
credential = System.getProperty("test." + provider + ".credential");
|
||||||
+ ".credential");
|
endpoint = System.getProperty("test." + provider + ".endpoint");
|
||||||
endpoint = checkNotNull(System.getProperty("test." + provider + ".endpoint"), "test." + provider + ".endpoint");
|
apiversion = System.getProperty("test." + provider + ".apiversion");
|
||||||
apiversion = checkNotNull(System.getProperty("test." + provider + ".apiversion"), "test." + provider
|
|
||||||
+ ".apiversion");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Properties setupProperties() {
|
protected Properties setupProperties() {
|
||||||
|
@ -88,8 +88,11 @@ public class AMIClientLiveTest {
|
||||||
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
||||||
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
||||||
overrides.setProperty(provider + ".identity", identity);
|
overrides.setProperty(provider + ".identity", identity);
|
||||||
|
if (credential != null)
|
||||||
overrides.setProperty(provider + ".credential", credential);
|
overrides.setProperty(provider + ".credential", credential);
|
||||||
|
if (endpoint != null)
|
||||||
overrides.setProperty(provider + ".endpoint", endpoint);
|
overrides.setProperty(provider + ".endpoint", endpoint);
|
||||||
|
if (apiversion != null)
|
||||||
overrides.setProperty(provider + ".apiversion", apiversion);
|
overrides.setProperty(provider + ".apiversion", apiversion);
|
||||||
return overrides;
|
return overrides;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@ import static org.testng.Assert.assertNotNull;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.Map.Entry;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import org.jclouds.Constants;
|
import org.jclouds.Constants;
|
||||||
import org.jclouds.aws.domain.Region;
|
import org.jclouds.aws.domain.Region;
|
||||||
|
@ -41,13 +41,13 @@ import org.jclouds.compute.ComputeServiceContextFactory;
|
||||||
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
||||||
import org.jclouds.rest.RestContext;
|
import org.jclouds.rest.RestContext;
|
||||||
import org.testng.annotations.AfterTest;
|
import org.testng.annotations.AfterTest;
|
||||||
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeGroups;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,13 +66,12 @@ public class AvailabilityZoneAndRegionClientLiveTest {
|
||||||
protected String endpoint;
|
protected String endpoint;
|
||||||
protected String apiversion;
|
protected String apiversion;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
protected void setupCredentials() {
|
protected void setupCredentials() {
|
||||||
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
||||||
credential = checkNotNull(System.getProperty("test." + provider + ".credential"), "test." + provider
|
credential = System.getProperty("test." + provider + ".credential");
|
||||||
+ ".credential");
|
endpoint = System.getProperty("test." + provider + ".endpoint");
|
||||||
endpoint = checkNotNull(System.getProperty("test." + provider + ".endpoint"), "test." + provider + ".endpoint");
|
apiversion = System.getProperty("test." + provider + ".apiversion");
|
||||||
apiversion = checkNotNull(System.getProperty("test." + provider + ".apiversion"), "test." + provider
|
|
||||||
+ ".apiversion");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Properties setupProperties() {
|
protected Properties setupProperties() {
|
||||||
|
@ -80,8 +79,11 @@ public class AvailabilityZoneAndRegionClientLiveTest {
|
||||||
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
||||||
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
||||||
overrides.setProperty(provider + ".identity", identity);
|
overrides.setProperty(provider + ".identity", identity);
|
||||||
|
if (credential != null)
|
||||||
overrides.setProperty(provider + ".credential", credential);
|
overrides.setProperty(provider + ".credential", credential);
|
||||||
|
if (endpoint != null)
|
||||||
overrides.setProperty(provider + ".endpoint", endpoint);
|
overrides.setProperty(provider + ".endpoint", endpoint);
|
||||||
|
if (apiversion != null)
|
||||||
overrides.setProperty(provider + ".apiversion", apiversion);
|
overrides.setProperty(provider + ".apiversion", apiversion);
|
||||||
return overrides;
|
return overrides;
|
||||||
}
|
}
|
||||||
|
@ -90,26 +92,25 @@ public class AvailabilityZoneAndRegionClientLiveTest {
|
||||||
public void setupClient() {
|
public void setupClient() {
|
||||||
setupCredentials();
|
setupCredentials();
|
||||||
Properties overrides = setupProperties();
|
Properties overrides = setupProperties();
|
||||||
context = new ComputeServiceContextFactory().createContext(provider, ImmutableSet.<Module> of(new Log4JLoggingModule()),
|
context = new ComputeServiceContextFactory().createContext(provider,
|
||||||
overrides).getProviderSpecificContext();
|
ImmutableSet.<Module> of(new Log4JLoggingModule()), overrides).getProviderSpecificContext();
|
||||||
client = context.getApi().getAvailabilityZoneAndRegionServices();
|
client = context.getApi().getAvailabilityZoneAndRegionServices();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDescribeAvailabilityZones() {
|
public void testDescribeAvailabilityZones() {
|
||||||
for (String region : Lists.newArrayList(null, Region.EU_WEST_1, Region.US_EAST_1,
|
for (String region : Lists.newArrayList(null, Region.EU_WEST_1, Region.US_EAST_1, Region.US_WEST_1,
|
||||||
Region.US_WEST_1, Region.AP_SOUTHEAST_1)) {
|
Region.AP_SOUTHEAST_1)) {
|
||||||
Set<AvailabilityZoneInfo> allResults = Sets.newLinkedHashSet(client
|
Set<AvailabilityZoneInfo> allResults = client.describeAvailabilityZonesInRegion(region);
|
||||||
.describeAvailabilityZonesInRegion(region));
|
|
||||||
assertNotNull(allResults);
|
assertNotNull(allResults);
|
||||||
assert allResults.size() >= 2 : allResults.size();
|
assert allResults.size() >= 2 : allResults.size();
|
||||||
Iterator<AvailabilityZoneInfo> iterator = allResults.iterator();
|
Iterator<AvailabilityZoneInfo> iterator = allResults.iterator();
|
||||||
String id1 = iterator.next().getZone();
|
String id1 = iterator.next().getZone();
|
||||||
String id2 = iterator.next().getZone();
|
String id2 = iterator.next().getZone();
|
||||||
Set<AvailabilityZoneInfo> twoResults = Sets.newLinkedHashSet(client
|
Set<AvailabilityZoneInfo> twoResults = client.describeAvailabilityZonesInRegion(region,
|
||||||
.describeAvailabilityZonesInRegion(region, availabilityZones(id1, id2)));
|
availabilityZones(id1, id2));
|
||||||
assertNotNull(twoResults);
|
assertNotNull(twoResults);
|
||||||
assertEquals(twoResults.size(), 2);
|
assertEquals(twoResults.size(), 2);
|
||||||
iterator = twoResults.iterator();
|
iterator = allResults.iterator();
|
||||||
assertEquals(iterator.next().getZone(), id1);
|
assertEquals(iterator.next().getZone(), id1);
|
||||||
assertEquals(iterator.next().getZone(), id2);
|
assertEquals(iterator.next().getZone(), id2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ import java.util.SortedSet;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.jclouds.Constants;
|
import org.jclouds.Constants;
|
||||||
import org.jclouds.aws.AWSResponseException;
|
|
||||||
import org.jclouds.aws.domain.Region;
|
import org.jclouds.aws.domain.Region;
|
||||||
import org.jclouds.aws.ec2.EC2AsyncClient;
|
import org.jclouds.aws.ec2.EC2AsyncClient;
|
||||||
import org.jclouds.aws.ec2.EC2Client;
|
import org.jclouds.aws.ec2.EC2Client;
|
||||||
|
@ -44,6 +43,7 @@ import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
||||||
import org.jclouds.predicates.RetryablePredicate;
|
import org.jclouds.predicates.RetryablePredicate;
|
||||||
import org.jclouds.rest.RestContext;
|
import org.jclouds.rest.RestContext;
|
||||||
import org.testng.annotations.AfterTest;
|
import org.testng.annotations.AfterTest;
|
||||||
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeGroups;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@ -71,13 +71,12 @@ public class ElasticBlockStoreClientLiveTest {
|
||||||
protected String endpoint;
|
protected String endpoint;
|
||||||
protected String apiversion;
|
protected String apiversion;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
protected void setupCredentials() {
|
protected void setupCredentials() {
|
||||||
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
||||||
credential = checkNotNull(System.getProperty("test." + provider + ".credential"), "test." + provider
|
credential = System.getProperty("test." + provider + ".credential");
|
||||||
+ ".credential");
|
endpoint = System.getProperty("test." + provider + ".endpoint");
|
||||||
endpoint = checkNotNull(System.getProperty("test." + provider + ".endpoint"), "test." + provider + ".endpoint");
|
apiversion = System.getProperty("test." + provider + ".apiversion");
|
||||||
apiversion = checkNotNull(System.getProperty("test." + provider + ".apiversion"), "test." + provider
|
|
||||||
+ ".apiversion");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Properties setupProperties() {
|
protected Properties setupProperties() {
|
||||||
|
@ -85,8 +84,11 @@ public class ElasticBlockStoreClientLiveTest {
|
||||||
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
||||||
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
||||||
overrides.setProperty(provider + ".identity", identity);
|
overrides.setProperty(provider + ".identity", identity);
|
||||||
|
if (credential != null)
|
||||||
overrides.setProperty(provider + ".credential", credential);
|
overrides.setProperty(provider + ".credential", credential);
|
||||||
|
if (endpoint != null)
|
||||||
overrides.setProperty(provider + ".endpoint", endpoint);
|
overrides.setProperty(provider + ".endpoint", endpoint);
|
||||||
|
if (apiversion != null)
|
||||||
overrides.setProperty(provider + ".apiversion", apiversion);
|
overrides.setProperty(provider + ".apiversion", apiversion);
|
||||||
return overrides;
|
return overrides;
|
||||||
}
|
}
|
||||||
|
@ -95,8 +97,8 @@ public class ElasticBlockStoreClientLiveTest {
|
||||||
public void setupClient() {
|
public void setupClient() {
|
||||||
setupCredentials();
|
setupCredentials();
|
||||||
Properties overrides = setupProperties();
|
Properties overrides = setupProperties();
|
||||||
context = new ComputeServiceContextFactory().createContext(provider, ImmutableSet.<Module> of(new Log4JLoggingModule()),
|
context = new ComputeServiceContextFactory().createContext(provider,
|
||||||
overrides).getProviderSpecificContext();
|
ImmutableSet.<Module> of(new Log4JLoggingModule()), overrides).getProviderSpecificContext();
|
||||||
client = context.getApi().getElasticBlockStoreServices();
|
client = context.getApi().getElasticBlockStoreServices();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,8 +168,8 @@ public class ElasticBlockStoreClientLiveTest {
|
||||||
|
|
||||||
@Test(dependsOnMethods = "testCreateSnapshotInRegion")
|
@Test(dependsOnMethods = "testCreateSnapshotInRegion")
|
||||||
void testCreateVolumeFromSnapshotInAvailabilityZoneWithSize() {
|
void testCreateVolumeFromSnapshotInAvailabilityZoneWithSize() {
|
||||||
Volume volume = client.createVolumeFromSnapshotInAvailabilityZone(AvailabilityZone.US_EAST_1B, 2, snapshot
|
Volume volume = client.createVolumeFromSnapshotInAvailabilityZone(AvailabilityZone.US_EAST_1B, 2,
|
||||||
.getId());
|
snapshot.getId());
|
||||||
assertNotNull(volume);
|
assertNotNull(volume);
|
||||||
|
|
||||||
Predicate<Volume> availabile = new RetryablePredicate<Volume>(new VolumeAvailable(client), 600, 10,
|
Predicate<Volume> availabile = new RetryablePredicate<Volume>(new VolumeAvailable(client), 600, 10,
|
||||||
|
@ -202,8 +204,8 @@ public class ElasticBlockStoreClientLiveTest {
|
||||||
assertNotNull(allResults);
|
assertNotNull(allResults);
|
||||||
if (allResults.size() >= 1) {
|
if (allResults.size() >= 1) {
|
||||||
Snapshot snapshot = allResults.last();
|
Snapshot snapshot = allResults.last();
|
||||||
Snapshot result = Iterables.getOnlyElement(client.describeSnapshotsInRegion(region, snapshotIds(snapshot
|
Snapshot result = Iterables.getOnlyElement(client.describeSnapshotsInRegion(region,
|
||||||
.getId())));
|
snapshotIds(snapshot.getId())));
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertEquals(result, snapshot);
|
assertEquals(result, snapshot);
|
||||||
}
|
}
|
||||||
|
@ -246,12 +248,7 @@ public class ElasticBlockStoreClientLiveTest {
|
||||||
@Test(dependsOnMethods = "testGetCreateVolumePermissionForSnapshot")
|
@Test(dependsOnMethods = "testGetCreateVolumePermissionForSnapshot")
|
||||||
void testDeleteSnapshotInRegion() {
|
void testDeleteSnapshotInRegion() {
|
||||||
client.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
|
client.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
|
||||||
try {
|
assert client.describeSnapshotsInRegion(snapshot.getRegion(), snapshotIds(snapshot.getId())).size() == 0;
|
||||||
client.describeSnapshotsInRegion(snapshot.getRegion(), snapshotIds(snapshot.getId()));
|
|
||||||
assert false : "shoud have exception";
|
|
||||||
} catch (AWSResponseException e) {
|
|
||||||
assertEquals(e.getError().getCode(), "InvalidSnapshot.NotFound");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterTest
|
@AfterTest
|
||||||
|
|
|
@ -56,7 +56,9 @@ import org.jclouds.compute.domain.Template;
|
||||||
import org.jclouds.compute.predicates.NodePredicates;
|
import org.jclouds.compute.predicates.NodePredicates;
|
||||||
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
||||||
import org.jclouds.predicates.RetryablePredicate;
|
import org.jclouds.predicates.RetryablePredicate;
|
||||||
|
import org.jclouds.ssh.jsch.config.JschSshClientModule;
|
||||||
import org.testng.annotations.AfterTest;
|
import org.testng.annotations.AfterTest;
|
||||||
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeGroups;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@ -85,13 +87,12 @@ public class PlacementGroupClientLiveTest {
|
||||||
protected String endpoint;
|
protected String endpoint;
|
||||||
protected String apiversion;
|
protected String apiversion;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
protected void setupCredentials() {
|
protected void setupCredentials() {
|
||||||
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
||||||
credential = checkNotNull(System.getProperty("test." + provider + ".credential"), "test." + provider
|
credential = System.getProperty("test." + provider + ".credential");
|
||||||
+ ".credential");
|
endpoint = System.getProperty("test." + provider + ".endpoint");
|
||||||
endpoint = checkNotNull(System.getProperty("test." + provider + ".endpoint"), "test." + provider + ".endpoint");
|
apiversion = System.getProperty("test." + provider + ".apiversion");
|
||||||
apiversion = checkNotNull(System.getProperty("test." + provider + ".apiversion"), "test." + provider
|
|
||||||
+ ".apiversion");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Properties setupProperties() {
|
protected Properties setupProperties() {
|
||||||
|
@ -99,8 +100,11 @@ public class PlacementGroupClientLiveTest {
|
||||||
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
||||||
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
||||||
overrides.setProperty(provider + ".identity", identity);
|
overrides.setProperty(provider + ".identity", identity);
|
||||||
|
if (credential != null)
|
||||||
overrides.setProperty(provider + ".credential", credential);
|
overrides.setProperty(provider + ".credential", credential);
|
||||||
|
if (endpoint != null)
|
||||||
overrides.setProperty(provider + ".endpoint", endpoint);
|
overrides.setProperty(provider + ".endpoint", endpoint);
|
||||||
|
if (apiversion != null)
|
||||||
overrides.setProperty(provider + ".apiversion", apiversion);
|
overrides.setProperty(provider + ".apiversion", apiversion);
|
||||||
return overrides;
|
return overrides;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +113,8 @@ public class PlacementGroupClientLiveTest {
|
||||||
public void setupClient() throws FileNotFoundException, IOException {
|
public void setupClient() throws FileNotFoundException, IOException {
|
||||||
setupCredentials();
|
setupCredentials();
|
||||||
Properties overrides = setupProperties();
|
Properties overrides = setupProperties();
|
||||||
context = new ComputeServiceContextFactory().createContext(provider, ImmutableSet
|
context = new ComputeServiceContextFactory().createContext(provider,
|
||||||
.<Module> of(new Log4JLoggingModule()), overrides);
|
ImmutableSet.<Module> of(new Log4JLoggingModule(), new JschSshClientModule()), overrides);
|
||||||
keyPair = setupKeyPair();
|
keyPair = setupKeyPair();
|
||||||
|
|
||||||
client = EC2Client.class.cast(context.getProviderSpecificContext().getApi());
|
client = EC2Client.class.cast(context.getProviderSpecificContext().getApi());
|
||||||
|
@ -169,6 +173,7 @@ public class PlacementGroupClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testStartCCInstance() throws Exception {
|
public void testStartCCInstance() throws Exception {
|
||||||
|
|
||||||
Set<? extends Hardware> sizes = context.getComputeService().listHardwareProfiles();
|
Set<? extends Hardware> sizes = context.getComputeService().listHardwareProfiles();
|
||||||
assert any(sizes, new Predicate<Hardware>() {
|
assert any(sizes, new Predicate<Hardware>() {
|
||||||
|
|
||||||
|
@ -198,6 +203,8 @@ public class PlacementGroupClientLiveTest {
|
||||||
|
|
||||||
String tag = PREFIX + "cccluster";
|
String tag = PREFIX + "cccluster";
|
||||||
context.getComputeService().destroyNodesMatching(NodePredicates.withTag(tag));
|
context.getComputeService().destroyNodesMatching(NodePredicates.withTag(tag));
|
||||||
|
// TODO make this not lookup an explicit region
|
||||||
|
client.getPlacementGroupServices().deletePlacementGroupInRegion(null, "jclouds#" + tag + "#us-east-1");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Set<? extends NodeMetadata> nodes = context.getComputeService().runNodesWithTag(tag, 1, template);
|
Set<? extends NodeMetadata> nodes = context.getComputeService().runNodesWithTag(tag, 1, template);
|
||||||
|
|
|
@ -162,12 +162,10 @@
|
||||||
<priority value="DEBUG" />
|
<priority value="DEBUG" />
|
||||||
<appender-ref ref="ASYNCSSH" />
|
<appender-ref ref="ASYNCSSH" />
|
||||||
</category>
|
</category>
|
||||||
<!--
|
|
||||||
<category name="jclouds.wire">
|
<category name="jclouds.wire">
|
||||||
<priority value="DEBUG" />
|
<priority value="DEBUG" />
|
||||||
<appender-ref ref="ASYNCWIRE" />
|
<appender-ref ref="ASYNCWIRE" />
|
||||||
</category>
|
</category>
|
||||||
-->
|
|
||||||
<category name="jclouds.blobstore">
|
<category name="jclouds.blobstore">
|
||||||
<priority value="DEBUG" />
|
<priority value="DEBUG" />
|
||||||
<appender-ref ref="ASYNCBLOBSTORE" />
|
<appender-ref ref="ASYNCBLOBSTORE" />
|
||||||
|
|
|
@ -162,10 +162,12 @@
|
||||||
<priority value="DEBUG" />
|
<priority value="DEBUG" />
|
||||||
<appender-ref ref="ASYNCSSH" />
|
<appender-ref ref="ASYNCSSH" />
|
||||||
</category>
|
</category>
|
||||||
|
<!--
|
||||||
<category name="jclouds.wire">
|
<category name="jclouds.wire">
|
||||||
<priority value="DEBUG" />
|
<priority value="DEBUG" />
|
||||||
<appender-ref ref="ASYNCWIRE" />
|
<appender-ref ref="ASYNCWIRE" />
|
||||||
</category>
|
</category>
|
||||||
|
-->
|
||||||
<category name="jclouds.blobstore">
|
<category name="jclouds.blobstore">
|
||||||
<priority value="DEBUG" />
|
<priority value="DEBUG" />
|
||||||
<appender-ref ref="ASYNCBLOBSTORE" />
|
<appender-ref ref="ASYNCBLOBSTORE" />
|
||||||
|
|
|
@ -64,4 +64,27 @@ public class SlicehostComputeServiceLiveTest extends BaseComputeServiceLiveTest
|
||||||
RestContext<SlicehostClient, SlicehostAsyncClient> tmContext = new ComputeServiceContextFactory().createContext(
|
RestContext<SlicehostClient, SlicehostAsyncClient> tmContext = new ComputeServiceContextFactory().createContext(
|
||||||
provider, identity, credential).getProviderSpecificContext();
|
provider, identity, credential).getProviderSpecificContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expectedExceptions = UnsupportedOperationException.class)
|
||||||
|
public void testSuspendResume() throws Exception {
|
||||||
|
super.testSuspendResume();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(enabled = true, dependsOnMethods = "testSuspendResume")
|
||||||
|
@Override
|
||||||
|
public void testGetNodesWithDetails() throws Exception {
|
||||||
|
super.testGetNodesWithDetails();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(enabled = true, dependsOnMethods = "testSuspendResume")
|
||||||
|
@Override
|
||||||
|
public void testListNodes() throws Exception {
|
||||||
|
super.testListNodes();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(enabled = true, dependsOnMethods = { "testListNodes", "testGetNodesWithDetails" })
|
||||||
|
@Override
|
||||||
|
public void testDestroyNodes() {
|
||||||
|
super.testDestroyNodes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,4 +71,15 @@ public class VCloudComputeServiceLiveTest extends BaseComputeServiceLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(enabled = true, dependsOnMethods = "testSuspendResume")
|
||||||
|
@Override
|
||||||
|
public void testGetNodesWithDetails() throws Exception {
|
||||||
|
super.testGetNodesWithDetails();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(enabled = true, dependsOnMethods = { "testListNodes", "testGetNodesWithDetails" })
|
||||||
|
@Override
|
||||||
|
public void testDestroyNodes() {
|
||||||
|
super.testDestroyNodes();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue