Example #1
0
 public void TearDown()
 {
     S3TestUtils.CleanBucket(Client, BucketName);
     MissingAPILambdaFunctions.DeleteBucket(BucketName, TestRunner.RegionEndpoint);
     S3TestUtils.CleanBucket(Client, VersionedBucketName);
     MissingAPILambdaFunctions.DeleteBucket(VersionedBucketName, TestRunner.RegionEndpoint);
 }
Example #2
0
        public void OneTimeTearDown()
        {
            Exception      responseException = new Exception();
            AutoResetEvent ars = new AutoResetEvent(false);

            // Delete Delivery Stream
            Client.DeleteDeliveryStreamAsync(DeliveryStreamName, (response) =>
            {
                responseException = response.Exception;
                ars.Set();
            }, new AsyncOptions {
                ExecuteCallbackOnMainThread = false
            });
            ars.WaitOne();
            Utils.AssertExceptionIsNull(responseException);

            // Delete Role Policy
            iamClient.DeleteRolePolicyAsync(new Amazon.IdentityManagement.Model.DeleteRolePolicyRequest()
            {
                RoleName   = RoleName,
                PolicyName = PolicyName
            }, (response) =>
            {
                responseException = response.Exception;
                ars.Set();
            }, new AsyncOptions {
                ExecuteCallbackOnMainThread = false
            });
            ars.WaitOne();
            Utils.AssertExceptionIsNull(responseException);

            // Delete Role
            iamClient.DeleteRoleAsync(new Amazon.IdentityManagement.Model.DeleteRoleRequest()
            {
                RoleName = RoleName
            }, (response) =>
            {
                responseException = response.Exception;
                ars.Set();
            }, new AsyncOptions {
                ExecuteCallbackOnMainThread = false
            });
            ars.WaitOne();
            Utils.AssertExceptionIsNull(responseException);

            // Delete Bucket
            S3.S3TestUtils.CleanBucket(TestBase.CreateClient <Amazon.S3.AmazonS3Client, Amazon.S3.AmazonS3Config>(), BucketName);
            MissingAPILambdaFunctions.DeleteBucket(BucketName, TestRunner.RegionEndpoint);
        }
Example #3
0
 public void TearDown()
 {
     MissingAPILambdaFunctions.DeleteBucket(BucketName, TestRunner.RegionEndpoint);
 }