Exemple #1
0
 public static void Cleanup()
 {
     AmazonS3Util.DeleteS3BucketWithObjects(s3EncryptionClientMetadataMode, bucketName);
     s3EncryptionClientMetadataMode.Dispose();
     s3EncryptionClientFileMode.Dispose();
     Directory.Delete(TransferUtilityTests.BasePath, true);
 }
 public void Cleanup()
 {
     kmsClient.Dispose();
     s3Client.Dispose();
     s3EncryptionClientMetadataMode.Dispose();
     s3EncryptionClientFileMode.Dispose();
     s3EncryptionClientMetadataModeKMS.Dispose();
     s3EncryptionClientFileModeKMS.Dispose();
 }
        public void Cleanup()
        {
            if (bucketName != null)
            {
                AmazonS3Util.DeleteS3BucketWithObjects(s3Client, bucketName);
            }

            kmsClient.Dispose();
            s3Client.Dispose();
            s3EncryptionClientMetadataMode.Dispose();
            s3EncryptionClientFileMode.Dispose();
            s3EncryptionClientMetadataModeKMS.Dispose();
            s3EncryptionClientFileModeKMS.Dispose();
        }
Exemple #4
0
        protected override void Dispose(bool disposing)
        {
            UtilityMethods.DeleteBucketWithObjectsAsync(s3EncryptionClientMetadataMode, bucketName).Wait();

            s3EncryptionClientMetadataMode.Dispose();
            s3EncryptionClientFileMode.Dispose();

            foreach (string file in _filesToDelete)
            {
                if (File.Exists(file))
                {
                    File.Delete(file);
                }
            }

            base.Dispose(disposing);
        }
 public static void Cleanup()
 {
     using (var kmsClient = new AmazonKeyManagementServiceClient())
     {
         kmsClient.ScheduleKeyDeletion(new ScheduleKeyDeletionRequest
         {
             KeyId = kmsKeyID,
             PendingWindowInDays = 7
         });
     }
     AmazonS3Util.DeleteS3BucketWithObjects(s3EncryptionClientMetadataMode, bucketName);
     s3EncryptionClientMetadataMode.Dispose();
     s3EncryptionClientFileMode.Dispose();
     s3EncryptionClientMetadataModeKMS.Dispose();
     s3EncryptionClientFileModeKMS.Dispose();
     Directory.Delete(TransferUtilityTests.BasePath, true);
     if (File.Exists(filePath))
     {
         File.Delete(filePath);
     }
 }
Exemple #6
0
        protected override void Dispose(bool disposing)
        {
            AmazonS3Util.DeleteS3BucketWithObjects(s3EncryptionClientMetadataModeAsymmetricWrapV1N, bucketName);
            s3EncryptionClientMetadataModeAsymmetricWrapV1N.Dispose();
            s3EncryptionClientFileModeAsymmetricWrapV1N.Dispose();
            s3EncryptionClientMetadataModeSymmetricWrapV1N.Dispose();
            s3EncryptionClientFileModeSymmetricWrapV1N.Dispose();
            s3EncryptionClientMetadataModeKMSV1N.Dispose();
            s3EncryptionClientFileModeKMSV1N.Dispose();

            s3EncryptionClientMetadataModeAsymmetricWrapV2.Dispose();
            s3EncryptionClientFileModeAsymmetricWrapV2.Dispose();
            s3EncryptionClientMetadataModeSymmetricWrapV2.Dispose();
            s3EncryptionClientFileModeSymmetricWrapV2.Dispose();
            s3EncryptionClientMetadataModeKMSV2.Dispose();
            s3EncryptionClientFileModeKMSV2.Dispose();

            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }
        }
        protected override void Dispose(bool disposing)
        {
            EncryptionTestsUtils.CallAsyncTask(UtilityMethods.DeleteBucketWithObjectsAsync(s3EncryptionClientMetadataModeAsymmetricWrapV1, bucketName));
            s3EncryptionClientMetadataModeAsymmetricWrapV1.Dispose();
            s3EncryptionClientFileModeAsymmetricWrapV1.Dispose();
            s3EncryptionClientMetadataModeSymmetricWrapV1.Dispose();
            s3EncryptionClientFileModeSymmetricWrapV1.Dispose();
            s3EncryptionClientMetadataModeKMSV1.Dispose();
            s3EncryptionClientFileModeKMSV1.Dispose();

            s3EncryptionClientMetadataModeAsymmetricWrapV1N.Dispose();
            s3EncryptionClientFileModeAsymmetricWrapV1N.Dispose();
            s3EncryptionClientMetadataModeSymmetricWrapV1N.Dispose();
            s3EncryptionClientFileModeSymmetricWrapV1N.Dispose();
            s3EncryptionClientMetadataModeKMSV1N.Dispose();
            s3EncryptionClientFileModeKMSV1N.Dispose();

            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }
        }
        protected override void Dispose(bool disposing)
        {
            using (var kmsClient = new AmazonKeyManagementServiceClient())
            {
                CallAsyncTask(
                    kmsClient.ScheduleKeyDeletionAsync(new ScheduleKeyDeletionRequest
                {
                    KeyId = kmsKeyID,
                    PendingWindowInDays = 7
                }));
            }

            CallAsyncTask(
                UtilityMethods.DeleteBucketWithObjectsAsync(s3EncryptionClientMetadataMode, bucketName));
            s3EncryptionClientMetadataMode.Dispose();
            s3EncryptionClientFileMode.Dispose();
            s3EncryptionClientMetadataModeKMS.Dispose();
            s3EncryptionClientFileModeKMS.Dispose();
            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }
        }
Exemple #9
0
 public static void Cleanup()
 {
     AmazonS3Util.DeleteS3BucketWithObjects(s3EncryptionClientMetadataMode, bucketName);
     s3EncryptionClientMetadataMode.Dispose();
     s3EncryptionClientFileMode.Dispose();
 }