mirror of https://github.com/apache/jclouds.git
removed redundant tests present in EC2ElasticBlockStoreClientExpectTest
This commit is contained in:
parent
72deb93570
commit
059bd5ab05
|
@ -30,7 +30,6 @@ import org.jclouds.ec2.options.CreateSnapshotOptions;
|
|||
import org.jclouds.ec2.options.DescribeSnapshotsOptions;
|
||||
import org.jclouds.ec2.options.DetachVolumeOptions;
|
||||
import org.jclouds.ec2.xml.AttachmentHandler;
|
||||
import org.jclouds.ec2.xml.CreateVolumeResponseHandler;
|
||||
import org.jclouds.ec2.xml.DescribeSnapshotsResponseHandler;
|
||||
import org.jclouds.ec2.xml.DescribeVolumesResponseHandler;
|
||||
import org.jclouds.ec2.xml.PermissionHandler;
|
||||
|
@ -54,59 +53,6 @@ import com.google.inject.TypeLiteral;
|
|||
@Test(groups = "unit", testName = "ElasticBlockStoreAsyncClientTest")
|
||||
public class ElasticBlockStoreAsyncClientTest extends BaseEC2AsyncClientTest<ElasticBlockStoreAsyncClient> {
|
||||
|
||||
public void testCreateVolume() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = ElasticBlockStoreAsyncClient.class.getMethod("createVolumeInAvailabilityZone", String.class,
|
||||
int.class);
|
||||
HttpRequest request = processor.createRequest(method, "us-east-1a", 20);
|
||||
|
||||
assertRequestLineEquals(request, "POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(request, "Host: ec2.us-east-1.amazonaws.com\n");
|
||||
assertPayloadEquals(request, "Action=CreateVolume&AvailabilityZone=us-east-1a&Size=20",
|
||||
"application/x-www-form-urlencoded", false);
|
||||
|
||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||
assertSaxResponseParserClassEquals(method, CreateVolumeResponseHandler.class);
|
||||
assertExceptionParserClassEquals(method, null);
|
||||
|
||||
checkFilters(request);
|
||||
}
|
||||
|
||||
public void testCreateVolumeFromSnapShot() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = ElasticBlockStoreAsyncClient.class.getMethod("createVolumeFromSnapshotInAvailabilityZone",
|
||||
String.class, String.class);
|
||||
HttpRequest request = processor.createRequest(method, "us-east-1a", "snapshotId");
|
||||
|
||||
assertRequestLineEquals(request, "POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(request, "Host: ec2.us-east-1.amazonaws.com\n");
|
||||
assertPayloadEquals(request,
|
||||
"Action=CreateVolume&AvailabilityZone=us-east-1a&SnapshotId=snapshotId",
|
||||
"application/x-www-form-urlencoded", false);
|
||||
|
||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||
assertSaxResponseParserClassEquals(method, CreateVolumeResponseHandler.class);
|
||||
assertExceptionParserClassEquals(method, null);
|
||||
|
||||
checkFilters(request);
|
||||
}
|
||||
|
||||
public void testCreateVolumeFromSnapShotWithSize() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = ElasticBlockStoreAsyncClient.class.getMethod("createVolumeFromSnapshotInAvailabilityZone",
|
||||
String.class, int.class, String.class);
|
||||
HttpRequest request = processor.createRequest(method, "us-east-1a", 15, "snapshotId");
|
||||
|
||||
assertRequestLineEquals(request, "POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(request, "Host: ec2.us-east-1.amazonaws.com\n");
|
||||
assertPayloadEquals(request,
|
||||
"Action=CreateVolume&AvailabilityZone=us-east-1a&SnapshotId=snapshotId&Size=15",
|
||||
"application/x-www-form-urlencoded", false);
|
||||
|
||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||
assertSaxResponseParserClassEquals(method, CreateVolumeResponseHandler.class);
|
||||
assertExceptionParserClassEquals(method, null);
|
||||
|
||||
checkFilters(request);
|
||||
}
|
||||
|
||||
public void testDeleteVolume() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = ElasticBlockStoreAsyncClient.class.getMethod("deleteVolumeInRegion", String.class, String.class);
|
||||
HttpRequest request = processor.createRequest(method, null, "id");
|
||||
|
|
Loading…
Reference in New Issue