Examples of deleteBucket()


Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

            if (deleteAllObjects) {
                deleteAllObjectsInBucket(bucketName);
            }

            service.deleteBucket(bucketName);
        } catch (Exception e) {
            // This shouldn't happen, but if it does don't ruin the test
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

        boolean bucketExists = service.isBucketAccessible(bucketName);
        assertTrue("Bucket should exist", bucketExists);

        try {
            service.deleteBucket((String) null);
            fail("Cannot delete a bucket with null name");
        } catch (ServiceException e) {
        }

        try {
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

            fail("Cannot delete a bucket with null name");
        } catch (ServiceException e) {
        }

        try {
            service.deleteBucket("");
            fail("Cannot delete a bucket with empty name");
        } catch (ServiceException e) {
        }

        try {
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

            fail("Cannot delete a bucket with empty name");
        } catch (ServiceException e) {
        }

        try {
            service.deleteBucket("test");
            fail("Cannot delete a bucket you don't own");
        } catch (ServiceException e) {
        }

        // Ensure we can delete our bucket
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

            fail("Cannot delete a bucket you don't own");
        } catch (ServiceException e) {
        }

        // Ensure we can delete our bucket
        service.deleteBucket(bucketName);
    }

    public void testBucketStatusLookup() throws Exception {
        String bucketName = getBucketNameForTest("testBucketStatusLookup");
        RestStorageService service = getStorageService(getCredentials());
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

            // Bucket now exists and is owned by me.
            status = service.checkBucketStatus(bucketName);
            assertEquals(S3Service.BUCKET_STATUS__MY_BUCKET, status);
        } finally {
            // Clean up
            service.deleteBucket(bucketName);
        }
    }

    public void testBucketLocations() throws Exception {
        RestStorageService service = getStorageService(getCredentials());
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

                assertEquals(null, bucketLocation); // For S3, the default/null location is literally null
            } else {
                assertEquals("US", bucketLocation); // For GS, "US" is default/null location
            }
        } finally {
            service.deleteBucket(bucketName);
        }
        // Create bucket in alternate location
        bucketName = getBucketNameForTest("testBucketLocations-test2");
        try {
            StorageBucket newBucket = null;
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

            String bucketLocation = (service instanceof S3Service
                ? ((S3Service) service).getBucketLocation(bucketName)
                : ((GoogleStorageService) service).getBucketLocation(bucketName) );
            assertEquals(targetLocation, bucketLocation);
        } finally {
            service.deleteBucket(bucketName);
        }
    }

    public void testObjectManagement() throws Exception {
        String bucketName = createBucketForTest("testObjectManagement").getName();
View Full Code Here

Examples of org.jets3t.service.impl.rest.httpclient.RestStorageService.deleteBucket()

            assertEquals("Unexpected size for 'empty' object", 0, basicObject.getContentLength());
            basicObject.closeDataInputStream();

            // Make sure bucket cannot be removed while it has contents.
            try {
                service.deleteBucket(bucketName);
                fail("Should not be able to delete a bucket containing objects");
            } catch (ServiceException e) {
            }

            // Update/overwrite object with real data content and some metadata.
View Full Code Here

Examples of org.jets3t.service.impl.soap.axis._2006_03_01.AmazonS3SoapBindingStub.deleteBucket()

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "DeleteBucket" + convertDateToString(timestamp));
            s3SoapBinding.deleteBucket(
                bucketName, getAWSAccessKey(), timestamp, signature, null);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new S3ServiceException("Unable to Delete Bucket: " + bucketName, e);  
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.