made elb compile again

This commit is contained in:
Adrian Cole 2011-12-14 21:22:54 -08:00
parent 22195894cc
commit 0cacd043a9
5 changed files with 35 additions and 32 deletions

View File

@ -67,14 +67,16 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-jsch</artifactId>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@ -90,12 +92,6 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>

View File

@ -22,11 +22,14 @@ import static org.testng.Assert.assertEquals;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.URI;
import java.util.Map;
import java.util.Properties;
import javax.inject.Named;
import org.jclouds.Constants;
import org.jclouds.aws.domain.Region;
import org.jclouds.aws.filters.FormSigner;
import org.jclouds.date.DateService;
import org.jclouds.elb.config.ELBRestClientModule;
@ -46,6 +49,7 @@ import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404;
import org.jclouds.rest.internal.RestAnnotationProcessor;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMap;
import com.google.inject.Module;
import com.google.inject.TypeLiteral;
@ -170,6 +174,20 @@ public class ELBAsyncClientTest extends RestClientTest<ELBAsyncClient> {
@Named(Constants.PROPERTY_SESSION_INTERVAL) int expiration) {
return "2009-11-08T15:54:08.897Z";
}
@Override
protected void bindRegionsToProvider() {
bindRegionsToProvider(Regions.class);
}
static class Regions implements javax.inject.Provider<Map<String, URI>> {
@Override
public Map<String, URI> get() {
return ImmutableMap.<String, URI> of(Region.EU_WEST_1, URI.create("https://elb.eu-west-1.amazonaws.com"),
Region.US_EAST_1, URI.create("https://elb.us-east-1.amazonaws.com"), Region.US_WEST_1,
URI.create("https://elb.us-west-1.amazonaws.com"));
}
}
}
@Override

View File

@ -30,7 +30,7 @@ import org.jclouds.elb.ELBClient;
import org.jclouds.elb.domain.LoadBalancer;
import org.jclouds.loadbalancer.BaseLoadBalancerServiceLiveTest;
import org.jclouds.rest.RestContext;
import org.jclouds.ssh.jsch.config.JschSshClientModule;
import org.jclouds.sshj.config.SshjSshClientModule;
import org.testng.annotations.Test;
/**
@ -46,8 +46,8 @@ public class ELBLoadBalancerServiceLiveTest extends BaseLoadBalancerServiceLiveT
}
@Override
protected JschSshClientModule getSshModule() {
return new JschSshClientModule();
protected SshjSshClientModule getSshModule() {
return new SshjSshClientModule();
}
@Override

View File

@ -74,6 +74,13 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<artifactId>aws-ec2</artifactId>
@ -88,21 +95,10 @@
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-jsch</artifactId>
<artifactId>jclouds-sshj</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>

View File

@ -20,11 +20,9 @@ package org.jclouds.aws.elb;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Properties;
import org.jclouds.aws.domain.Region;
import org.jclouds.elb.ELBAsyncClient;
import org.jclouds.rest.RestContextFactory;
import org.testng.annotations.Test;
/**
@ -40,11 +38,6 @@ public class ELBAsyncClientTest extends org.jclouds.elb.ELBAsyncClientTest {
this.provider = "aws-elb";
}
@Override
protected Properties getProperties() {
return RestContextFactory.getPropertiesFromResource("/rest.properties");
}
public void testAllRegions() throws SecurityException, NoSuchMethodException, IOException {
Method method = ELBAsyncClient.class.getMethod("describeLoadBalancersInRegion", String.class, String[].class);
for (String region : Region.DEFAULT_REGIONS) {