mirror of https://github.com/apache/jclouds.git
Move off confusing test names.
This commit is contained in:
parent
1b2cee0700
commit
99e217b720
|
@ -47,7 +47,7 @@ import org.jclouds.http.functions.ReleasePayloadAndReturn;
|
|||
import org.jclouds.http.functions.ReturnTrueIf2xx;
|
||||
import org.jclouds.http.options.GetOptions;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -59,7 +59,7 @@ import com.google.common.reflect.Invokable;
|
|||
import com.google.inject.Module;
|
||||
|
||||
@Test(groups = "unit", testName = "AtmosClientTest")
|
||||
public class AtmosClientTest extends BaseAsyncClientTest<AtmosClient> {
|
||||
public class AtmosClientTest extends BaseRestAnnotationProcessingTest<AtmosClient> {
|
||||
|
||||
private BlobToObject blobToObject;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.jclouds.blobstore.domain.Blob.Factory;
|
|||
import org.jclouds.date.TimeStamp;
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -45,7 +45,7 @@ import com.google.inject.Module;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "AtmosBlobRequestSignerTest")
|
||||
public class AtmosBlobRequestSignerTest extends BaseAsyncClientTest<AtmosClient> {
|
||||
public class AtmosBlobRequestSignerTest extends BaseRestAnnotationProcessingTest<AtmosClient> {
|
||||
|
||||
public AtmosBlobRequestSignerTest() {
|
||||
// this is base64 decoded in the signer;
|
||||
|
|
|
@ -62,7 +62,7 @@ import org.jclouds.openstack.keystone.v1_1.config.AuthenticationServiceModule.Ge
|
|||
import org.jclouds.openstack.keystone.v1_1.domain.Auth;
|
||||
import org.jclouds.openstack.keystone.v1_1.parse.ParseAuthTest;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -73,7 +73,7 @@ import com.google.inject.Module;
|
|||
import com.google.inject.Provides;
|
||||
|
||||
@Test(groups = "unit", singleThreaded = true, testName = "CloudServersClientTest")
|
||||
public class CloudServersClientTest extends BaseAsyncClientTest<CloudServersClient> {
|
||||
public class CloudServersClientTest extends BaseRestAnnotationProcessingTest<CloudServersClient> {
|
||||
|
||||
public void testCreateServer() throws IOException, SecurityException, NoSuchMethodException {
|
||||
Invokable<?, ?> method = method(CloudServersClient.class, "createServer", String.class, int.class, int.class,
|
||||
|
|
|
@ -25,11 +25,11 @@ import org.jclouds.http.HttpRequest;
|
|||
import org.jclouds.providers.AnonymousProviderMetadata;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncApiTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
|
||||
import com.google.inject.Module;
|
||||
|
||||
public abstract class BaseCloudStackApiTest<T> extends BaseAsyncApiTest<T> {
|
||||
public abstract class BaseCloudStackApiTest<T> extends BaseRestAnnotationProcessingTest<T> {
|
||||
|
||||
@ConfiguresHttpApi
|
||||
public static class CloudStackHttpApiModuleExtension extends CloudStackHttpApiModule {
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.jclouds.cloudstack.CloudStackApiMetadata;
|
|||
import org.jclouds.cloudstack.CloudStackContext;
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.inject.Module;
|
||||
|
@ -36,7 +36,7 @@ import com.google.inject.Module;
|
|||
/**
|
||||
* Base class for writing CloudStack Rest Client Expect tests
|
||||
*/
|
||||
public abstract class BaseCloudStackExpectTest<S> extends BaseRestClientExpectTest<S> {
|
||||
public abstract class BaseCloudStackExpectTest<S> extends BaseRestApiExpectTest<S> {
|
||||
|
||||
public BaseCloudStackExpectTest() {
|
||||
provider = "cloudstack";
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.jclouds.location.config.LocationModule;
|
|||
import org.jclouds.location.suppliers.RegionIdToURISupplier;
|
||||
import org.jclouds.location.suppliers.RegionIdToZoneIdsSupplier;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncApiTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.util.Suppliers2;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -55,7 +55,7 @@ import com.google.inject.Module;
|
|||
import com.google.inject.Provides;
|
||||
|
||||
@Test(groups = "unit")
|
||||
public abstract class BaseEC2ApiTest<T> extends BaseAsyncApiTest<T> {
|
||||
public abstract class BaseEC2ApiTest<T> extends BaseRestAnnotationProcessingTest<T> {
|
||||
@ConfiguresHttpApi
|
||||
protected static class StubEC2HttpApiModule extends BaseEC2HttpApiModule<EC2Api> {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.jclouds.date.DateService;
|
|||
import org.jclouds.date.internal.SimpleDateFormatDateService;
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
|
||||
import com.google.common.base.Functions;
|
||||
|
@ -35,7 +35,7 @@ import com.google.common.collect.ImmutableMap.Builder;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
public abstract class BaseEC2ExpectTest<T> extends BaseRestClientExpectTest<T> {
|
||||
public abstract class BaseEC2ExpectTest<T> extends BaseRestApiExpectTest<T> {
|
||||
protected static final String CONSTANT_DATE = "2012-04-16T15:54:08.897Z";
|
||||
|
||||
protected DateService dateService = new SimpleDateFormatDateService();
|
||||
|
|
|
@ -46,7 +46,7 @@ import org.jclouds.http.filters.BasicAuthentication;
|
|||
import org.jclouds.http.functions.ReleasePayloadAndReturn;
|
||||
import org.jclouds.io.Payload;
|
||||
import org.jclouds.io.Payloads;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -61,7 +61,7 @@ import com.google.inject.Scopes;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "ElasticStackApiTest")
|
||||
public class ElasticStackApiTest extends BaseAsyncClientTest<ElasticStackApi> {
|
||||
public class ElasticStackApiTest extends BaseRestAnnotationProcessingTest<ElasticStackApi> {
|
||||
public void testListServers() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Invokable<?, ?> method = method(ElasticStackApi.class, "listServers");
|
||||
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.of());
|
||||
|
|
|
@ -19,14 +19,14 @@ package org.jclouds.rackspace.cloudidentity.v1_1.internal;
|
|||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.rackspace.cloudidentity.v1_1.config.AuthenticationServiceModule;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
|
||||
import com.google.common.net.HttpHeaders;
|
||||
|
||||
/**
|
||||
* Base class for writing KeyStone Rest Client Expect tests
|
||||
*/
|
||||
public class BaseKeystoneRestClientExpectTest<S> extends BaseRestClientExpectTest<S> {
|
||||
public class BaseKeystoneRestClientExpectTest<S> extends BaseRestApiExpectTest<S> {
|
||||
|
||||
protected String endpoint = "http://localhost:5000";
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.jclouds.s3.internal;
|
|||
|
||||
import org.jclouds.date.TimeStamp;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.jclouds.s3.S3ApiMetadata;
|
||||
import org.jclouds.s3.S3Client;
|
||||
import org.jclouds.s3.config.S3HttpApiModule;
|
||||
|
@ -26,7 +26,7 @@ import org.jclouds.s3.config.S3HttpApiModule;
|
|||
import com.google.common.base.Supplier;
|
||||
import com.google.inject.Module;
|
||||
|
||||
public abstract class BaseS3ClientExpectTest extends BaseRestClientExpectTest<S3Client> {
|
||||
public abstract class BaseS3ClientExpectTest extends BaseRestApiExpectTest<S3Client> {
|
||||
|
||||
protected static final String CONSTANT_DATE = "2009-11-08T15:54:08.897Z";
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import static org.testng.Assert.assertEquals;
|
|||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.s3.S3ApiMetadata;
|
||||
import org.jclouds.s3.S3Client;
|
||||
import org.jclouds.s3.blobstore.functions.BlobToObject;
|
||||
|
@ -30,7 +30,7 @@ import org.testng.annotations.BeforeClass;
|
|||
import org.testng.annotations.Test;
|
||||
|
||||
@Test(groups = "unit")
|
||||
public abstract class BaseS3ClientTest<T extends S3Client> extends BaseAsyncClientTest<T> {
|
||||
public abstract class BaseS3ClientTest<T extends S3Client> extends BaseRestAnnotationProcessingTest<T> {
|
||||
|
||||
protected BlobToObject blobToS3Object;
|
||||
protected RequestAuthorizeSignature filter;
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.jclouds.openstack.swift.blobstore.SwiftBlobSigner;
|
|||
import org.jclouds.openstack.swift.blobstore.config.SwiftBlobStoreContextModule;
|
||||
import org.jclouds.openstack.swift.blobstore.config.TemporaryUrlExtensionModule;
|
||||
import org.jclouds.openstack.swift.config.SwiftHttpApiModule;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Supplier;
|
||||
|
@ -50,7 +50,7 @@ import com.google.inject.TypeLiteral;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "CommonSwiftClientTest")
|
||||
public abstract class CommonSwiftClientTest extends BaseAsyncClientTest<SwiftClient> {
|
||||
public abstract class CommonSwiftClientTest extends BaseRestAnnotationProcessingTest<SwiftClient> {
|
||||
|
||||
public static final long UNIX_EPOCH_TIMESTAMP = 123456789L;
|
||||
public static final String TEMPORARY_URL_KEY = "get-or-set-X-Account-Meta-Temp-Url-Key";
|
||||
|
|
|
@ -20,12 +20,12 @@ import java.util.Properties;
|
|||
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
|
||||
/**
|
||||
* Base class for writing Swift Expect tests
|
||||
*/
|
||||
public class BaseSwiftExpectTest<T> extends BaseRestClientExpectTest<T> {
|
||||
public class BaseSwiftExpectTest<T> extends BaseRestApiExpectTest<T> {
|
||||
|
||||
protected String endpoint = "http://myhost:8080/auth";
|
||||
protected HttpRequest authRequest;
|
||||
|
|
|
@ -23,12 +23,12 @@ import javax.ws.rs.core.MediaType;
|
|||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.openstack.keystone.v2_0.internal.KeystoneFixture;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
|
||||
/**
|
||||
* Base class for writing Swift Keystone Expect tests
|
||||
*/
|
||||
public class BaseSwiftKeystoneExpectTest<T> extends BaseRestClientExpectTest<T> {
|
||||
public class BaseSwiftKeystoneExpectTest<T> extends BaseRestApiExpectTest<T> {
|
||||
protected HttpRequest keystoneAuthWithUsernameAndPassword;
|
||||
protected HttpRequest keystoneAuthWithUsernameAndPasswordAndTenantName;
|
||||
protected HttpRequest keystoneAuthWithAccessKeyAndSecretKeyAndTenantName;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
package org.jclouds.vcloud;
|
||||
|
||||
import static org.jclouds.reflect.Reflection2.method;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
|
@ -24,7 +25,7 @@ import org.jclouds.http.HttpRequest;
|
|||
import org.jclouds.http.functions.ParseSax;
|
||||
import org.jclouds.providers.AnonymousProviderMetadata;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.jclouds.vcloud.xml.SupportedVersionsHandler;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -37,7 +38,7 @@ import com.google.common.reflect.Invokable;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "VCloudVersionsApiTest")
|
||||
public class VCloudVersionsApiTest extends BaseAsyncClientTest<VCloudVersionsApi> {
|
||||
public class VCloudVersionsApiTest extends BaseRestAnnotationProcessingTest<VCloudVersionsApi> {
|
||||
|
||||
public void testVersions() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Invokable<?, ?> method = method(VCloudVersionsApi.class, "getSupportedVersions");
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.jclouds.apis.ApiMetadata;
|
|||
import org.jclouds.compute.ComputeService;
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.jclouds.vcloud.VCloudApiMetadata;
|
||||
import org.jclouds.vcloud.VCloudMediaType;
|
||||
|
||||
|
@ -36,7 +36,7 @@ import com.google.inject.Module;
|
|||
/**
|
||||
* Base class for writing VCloud Expect tests for ComputeService operations
|
||||
*/
|
||||
public abstract class BaseVCloudComputeServiceExpectTest extends BaseRestClientExpectTest<ComputeService> {
|
||||
public abstract class BaseVCloudComputeServiceExpectTest extends BaseRestApiExpectTest<ComputeService> {
|
||||
protected static final String ENDPOINT = "https://zone.myvcloud.com/api";
|
||||
|
||||
protected HttpRequest versionsRequest = HttpRequest.builder().method("GET").endpoint(
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.jclouds.providers.AnonymousProviderMetadata;
|
|||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.AuthorizationException;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.vcloud.VCloudApiMetadata;
|
||||
import org.jclouds.vcloud.VCloudMediaType;
|
||||
import org.jclouds.vcloud.VCloudVersionsApi;
|
||||
|
@ -73,7 +73,7 @@ import com.google.inject.TypeLiteral;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "BaseVCloudApiTest")
|
||||
public abstract class BaseVCloudApiTest<T> extends BaseAsyncClientTest<T> {
|
||||
public abstract class BaseVCloudApiTest<T> extends BaseRestAnnotationProcessingTest<T> {
|
||||
|
||||
@Override
|
||||
protected void checkFilters(HttpRequest request) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.jclouds.http.filters.BasicAuthentication;
|
|||
import org.jclouds.location.Provider;
|
||||
import org.jclouds.providers.AnonymousProviderMetadata;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.jclouds.vcloud.endpoints.VCloudLogin;
|
||||
import org.jclouds.vcloud.functions.ParseLoginResponseFromHeaders;
|
||||
|
@ -45,7 +45,7 @@ import com.google.inject.Provides;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "VCloudLoginApiTest")
|
||||
public class VCloudLoginApiTest extends BaseAsyncClientTest<VCloudLoginApi> {
|
||||
public class VCloudLoginApiTest extends BaseRestAnnotationProcessingTest<VCloudLoginApi> {
|
||||
|
||||
public void testLogin() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Invokable<?, ?> method = method(VCloudLoginApi.class, "login");
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.jclouds.blobstore.config.LocalBlobStore;
|
|||
import org.jclouds.blobstore.domain.Blob;
|
||||
import org.jclouds.blobstore.domain.BlobBuilder;
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -41,7 +41,7 @@ import com.google.common.io.ByteSource;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "TransientBlobRequestSignerTest")
|
||||
public class TransientBlobRequestSignerTest extends BaseAsyncClientTest<LocalBlobStore> {
|
||||
public class TransientBlobRequestSignerTest extends BaseRestAnnotationProcessingTest<LocalBlobStore> {
|
||||
|
||||
private BlobRequestSigner signer;
|
||||
private Provider<BlobBuilder> blobFactory;
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.jclouds.blobstore.domain.Blob;
|
|||
import org.jclouds.blobstore.options.GetOptions;
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
@ -36,7 +36,7 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.hash.HashCode;
|
||||
import com.google.inject.Module;
|
||||
|
||||
public abstract class BaseBlobSignerExpectTest extends BaseRestClientExpectTest<BlobStore> {
|
||||
public abstract class BaseBlobSignerExpectTest extends BaseRestApiExpectTest<BlobStore> {
|
||||
|
||||
/**
|
||||
* define the requests and responses needed to initialize the blobstore. For
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.jclouds.http.IntegrationTestAsyncClient;
|
|||
import org.jclouds.http.IntegrationTestClient;
|
||||
import org.jclouds.openstack.functions.ParseAuthenticationResponseFromHeaders;
|
||||
import org.jclouds.rest.AnonymousRestApiMetadata;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -35,7 +35,7 @@ import com.google.common.collect.ImmutableList;
|
|||
import com.google.common.reflect.Invokable;
|
||||
|
||||
@Test(groups = "unit", testName = "OpenStackAuthClientTest")
|
||||
public class OpenStackAuthClientTest extends BaseAsyncClientTest<OpenStackAuthClient> {
|
||||
public class OpenStackAuthClientTest extends BaseRestAnnotationProcessingTest<OpenStackAuthClient> {
|
||||
|
||||
public void testAuthenticate() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Invokable<?, ?> method = method(OpenStackAuthClient.class, "authenticate", String.class, String.class);
|
||||
|
|
|
@ -19,14 +19,14 @@ package org.jclouds.openstack.keystone.v1_1.internal;
|
|||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.openstack.keystone.v1_1.config.AuthenticationServiceModule;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
|
||||
import com.google.common.net.HttpHeaders;
|
||||
|
||||
/**
|
||||
* Base class for writing KeyStone Rest Client Expect tests
|
||||
*/
|
||||
public class BaseKeystoneRestClientExpectTest<S> extends BaseRestClientExpectTest<S> {
|
||||
public class BaseKeystoneRestClientExpectTest<S> extends BaseRestApiExpectTest<S> {
|
||||
|
||||
protected String endpoint = "http://localhost:5000";
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.net.ssl.SSLException;
|
|||
|
||||
import org.jclouds.providers.JcloudsTestBlobStoreProviderMetadata;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
@ -37,7 +37,7 @@ import com.google.common.base.Function;
|
|||
*/
|
||||
@Test(groups = "unit", testName = "IntegrationTestClientExpectTest")
|
||||
// only needed as IntegrationTestClient is not registered in rest.properties
|
||||
public class IntegrationTestClientExpectTest extends BaseRestClientExpectTest<IntegrationTestClient> {
|
||||
public class IntegrationTestClientExpectTest extends BaseRestApiExpectTest<IntegrationTestClient> {
|
||||
|
||||
public void testRetryOnSSLExceptionClose() {
|
||||
// keeps track of request count
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.jclouds.rest.annotations.Fallback;
|
|||
import org.jclouds.rest.annotations.Payload;
|
||||
import org.jclouds.rest.annotations.PayloadParam;
|
||||
import org.jclouds.rest.config.RestClientModule;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
@ -46,7 +46,7 @@ import com.google.inject.Module;
|
|||
* Tests the ways that {@link Delegate}
|
||||
*/
|
||||
@Test(groups = "unit", testName = "DelegateAnnotationExpectTest")
|
||||
public class DelegateAnnotationExpectTest extends BaseRestClientExpectTest<DelegateAnnotationExpectTest.DelegatingApi> {
|
||||
public class DelegateAnnotationExpectTest extends BaseRestApiExpectTest<DelegateAnnotationExpectTest.DelegatingApi> {
|
||||
|
||||
interface DelegatingApi {
|
||||
@Delegate
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.jclouds.http.HttpResponse;
|
|||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.annotations.JAXBResponseParser;
|
||||
import org.jclouds.rest.annotations.Transform;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
@ -45,7 +45,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
*/
|
||||
@Test(groups = "unit", testName = "JAXBResponseParserAnnotationExpectTest")
|
||||
public class JAXBResponseParserAnnotationExpectTest extends
|
||||
BaseRestClientExpectTest<JAXBResponseParserAnnotationExpectTest.TestJAXBApi> {
|
||||
BaseRestApiExpectTest<JAXBResponseParserAnnotationExpectTest.TestJAXBApi> {
|
||||
|
||||
@XmlRootElement(name = "test")
|
||||
public static class TestJAXBDomain {
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.jclouds.http.HttpRequest;
|
|||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.annotations.PATCH;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ import org.testng.annotations.Test;
|
|||
*/
|
||||
@Test(groups = "unit", testName = "PATCHAnnotationExpectTest")
|
||||
public class PATCHAnnotationExpectTest extends
|
||||
BaseRestClientExpectTest<PATCHAnnotationExpectTest.TestPATCHAnnotationApi> {
|
||||
BaseRestApiExpectTest<PATCHAnnotationExpectTest.TestPATCHAnnotationApi> {
|
||||
|
||||
interface TestPATCHAnnotationApi extends Closeable {
|
||||
@PATCH
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.jclouds.providers.ProviderMetadata;
|
|||
import org.jclouds.rest.AuthorizationException;
|
||||
import org.jclouds.rest.ConfiguresRestClient;
|
||||
import org.jclouds.rest.config.RestClientModule;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
@ -45,7 +45,7 @@ import com.google.inject.name.Names;
|
|||
* Tests that we can add {@link Provides} methods on interfaces
|
||||
*/
|
||||
@Test(groups = "unit", testName = "ProvidesAnnotationExpectTest")
|
||||
public class ProvidesAnnotationExpectTest extends BaseRestClientExpectTest<ProvidesAnnotationExpectTest.ProvidingApi> {
|
||||
public class ProvidesAnnotationExpectTest extends BaseRestApiExpectTest<ProvidesAnnotationExpectTest.ProvidingApi> {
|
||||
|
||||
interface ProvidingApi extends Closeable {
|
||||
@Provides
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.jclouds.rest.internal;
|
|||
import org.testng.annotations.Test;
|
||||
|
||||
@Test(groups = "unit")
|
||||
public abstract class BaseAsyncClientTest<T> extends BaseAsyncApiTest<T> {
|
||||
// TODO: remove once abiquo no longer uses this.
|
||||
public abstract class BaseAsyncClientTest<T> extends BaseRestAnnotationProcessingTest<T> {
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import com.google.inject.Injector;
|
|||
import com.google.inject.Module;
|
||||
|
||||
@Test(groups = "unit")
|
||||
public abstract class BaseAsyncApiTest<T> extends BaseRestApiTest {
|
||||
public abstract class BaseRestAnnotationProcessingTest<T> extends BaseRestApiTest {
|
||||
|
||||
protected RestAnnotationProcessor processor;
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jclouds.rest.internal;
|
||||
|
||||
|
||||
/**
|
||||
* Please use {@link BaseRestApiExpectTest}
|
||||
*/
|
||||
public abstract class BaseRestClientExpectTest<S> extends BaseRestApiExpectTest<S> {
|
||||
|
||||
}
|
|
@ -38,7 +38,7 @@ import org.jclouds.location.config.LocationModule;
|
|||
import org.jclouds.location.suppliers.RegionIdToURISupplier;
|
||||
import org.jclouds.location.suppliers.RegionIdToZoneIdsSupplier;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncApiTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.util.Suppliers2;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -53,7 +53,7 @@ import com.google.inject.Module;
|
|||
import com.google.inject.Provides;
|
||||
|
||||
@Test(groups = "unit")
|
||||
public abstract class BaseAWSEC2ApiTest<T> extends BaseAsyncApiTest<T> {
|
||||
public abstract class BaseAWSEC2ApiTest<T> extends BaseRestAnnotationProcessingTest<T> {
|
||||
|
||||
@ConfiguresHttpApi
|
||||
protected static class StubAWSEC2HttpApiModule extends AWSEC2HttpApiModule {
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.jclouds.aws.s3.config.AWSS3HttpApiModule;
|
|||
import org.jclouds.date.TimeStamp;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.inject.Module;
|
||||
|
@ -30,7 +30,7 @@ import com.google.inject.Module;
|
|||
/**
|
||||
* Base class for writing Expect tests for AWS-S3
|
||||
*/
|
||||
public class BaseAWSS3ClientExpectTest extends BaseRestClientExpectTest<AWSS3Client> {
|
||||
public class BaseAWSS3ClientExpectTest extends BaseRestApiExpectTest<AWSS3Client> {
|
||||
|
||||
protected static final String CONSTANT_DATE = "2009-11-08T15:54:08.897Z";
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ import org.jclouds.http.functions.ParseSax;
|
|||
import org.jclouds.http.functions.ReleasePayloadAndReturn;
|
||||
import org.jclouds.http.functions.ReturnTrueIf2xx;
|
||||
import org.jclouds.http.options.GetOptions;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -54,7 +54,7 @@ import com.google.common.collect.ImmutableMultimap;
|
|||
import com.google.common.reflect.Invokable;
|
||||
|
||||
@Test(groups = "unit", testName = "AzureBlobClientTest")
|
||||
public class AzureBlobClientTest extends BaseAsyncClientTest<AzureBlobClient> {
|
||||
public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureBlobClient> {
|
||||
|
||||
public void testListContainers() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Invokable<?, ?> method = method(AzureBlobClient.class, "listContainers", ListOptions[].class);
|
||||
|
|
|
@ -26,13 +26,13 @@ import org.jclouds.azureblob.domain.AzureBlob;
|
|||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.io.Payload;
|
||||
import org.jclouds.io.Payloads;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
@Test(groups = "unit", testName = "BindAzureBlobMetadataToRequestTest")
|
||||
public class BindAzureBlobMetadataToRequestTest extends BaseAsyncClientTest<AzureBlobClient> {
|
||||
public class BindAzureBlobMetadataToRequestTest extends BaseRestAnnotationProcessingTest<AzureBlobClient> {
|
||||
|
||||
@Test
|
||||
public void testPassWithMinimumDetailsAndPayload64MB() {
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.jclouds.blobstore.domain.Blob.Factory;
|
|||
import org.jclouds.date.TimeStamp;
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -43,7 +43,7 @@ import com.google.inject.Module;
|
|||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(groups = "unit", testName = "AzureBlobRequestSignerTest")
|
||||
public class AzureBlobRequestSignerTest extends BaseAsyncClientTest<AzureBlobClient> {
|
||||
public class AzureBlobRequestSignerTest extends BaseRestAnnotationProcessingTest<AzureBlobClient> {
|
||||
|
||||
public AzureBlobRequestSignerTest() {
|
||||
// this is base64 decoded in the signer;
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.util.concurrent.ExecutionException;
|
|||
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.internal.BaseAsyncApiTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -31,7 +31,7 @@ import org.testng.annotations.Test;
|
|||
// NOTE:without testName, this will not call @Before* and fail w/NPE during
|
||||
// surefire
|
||||
@Test(groups = "unit", testName = "GleSYSApiTest")
|
||||
public class GleSYSApiTest extends BaseAsyncApiTest<GleSYSApi> {
|
||||
public class GleSYSApiTest extends BaseRestAnnotationProcessingTest<GleSYSApi> {
|
||||
private GleSYSApi syncApi;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,21 +25,21 @@ import org.jclouds.gogrid.filters.SharedKeyLiteAuthentication;
|
|||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseAsyncClientTest;
|
||||
import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.inject.Module;
|
||||
|
||||
@Test(groups = "unit")
|
||||
public abstract class BaseGoGridApiTest<T> extends BaseAsyncClientTest<T> {
|
||||
public abstract class BaseGoGridApiTest<T> extends BaseRestAnnotationProcessingTest<T> {
|
||||
@Override
|
||||
protected void checkFilters(HttpRequest request) {
|
||||
assertEquals(request.getFilters().size(), 1);
|
||||
assertEquals(request.getFilters().get(0).getClass(), SharedKeyLiteAuthentication.class);
|
||||
}
|
||||
|
||||
@ConfiguresHttpApi
|
||||
@ConfiguresHttpApi
|
||||
protected static final class TestGoGridHttpApiModule extends GoGridHttpApiModule {
|
||||
@Override
|
||||
protected void configure() {
|
||||
|
|
|
@ -20,18 +20,18 @@ import org.jclouds.date.TimeStamp;
|
|||
import org.jclouds.gogrid.GoGridApi;
|
||||
import org.jclouds.gogrid.config.GoGridHttpApiModule;
|
||||
import org.jclouds.rest.ConfiguresHttpApi;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.inject.Module;
|
||||
|
||||
public class BaseGoGridHttpApiExpectTest extends BaseRestClientExpectTest<GoGridApi> {
|
||||
public class BaseGoGridHttpApiExpectTest extends BaseRestApiExpectTest<GoGridApi> {
|
||||
|
||||
public BaseGoGridHttpApiExpectTest() {
|
||||
provider = "gogrid";
|
||||
}
|
||||
|
||||
@ConfiguresHttpApi
|
||||
@ConfiguresHttpApi
|
||||
protected static final class TestGoGridHttpApiModule extends GoGridHttpApiModule {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,14 +23,14 @@ import org.jclouds.hpcloud.objectstorage.HPCloudObjectStorageProviderMetadata;
|
|||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.rest.internal.BaseRestClientExpectTest;
|
||||
import org.jclouds.rest.internal.BaseRestApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.inject.Module;
|
||||
|
||||
@Test(groups = "unit", testName = "HPCloudObjectStorageExpectTest")
|
||||
public class BaseHPCloudObjectStorageBlobStoreExpectTest extends BaseRestClientExpectTest<BlobStore> {
|
||||
public class BaseHPCloudObjectStorageBlobStoreExpectTest extends BaseRestApiExpectTest<BlobStore> {
|
||||
|
||||
|
||||
protected HttpRequest keystoneAuthWithUsernameAndPassword;
|
||||
|
|
Loading…
Reference in New Issue