From a3d052dd2262ba14238773fb194fbe0f31cf0cc7 Mon Sep 17 00:00:00 2001 From: James Saryerwinnie Date: Wed, 2 Sep 2015 17:17:34 -0700 Subject: [PATCH] Fix failing build from botocore bucket validation We were creating bucket names that had a trailing '/' which is wrong. --- tests/integration/customizations/s3/test_s3handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/customizations/s3/test_s3handler.py b/tests/integration/customizations/s3/test_s3handler.py index 7a903d40cdc8..b44846fef105 100644 --- a/tests/integration/customizations/s3/test_s3handler.py +++ b/tests/integration/customizations/s3/test_s3handler.py @@ -353,7 +353,7 @@ def tearDown(self): def test_bucket(self): rand1 = random.randrange(5000) rand2 = random.randrange(5000) - self.bucket = str(rand1) + 'mybucket' + str(rand2) + '/' + self.bucket = str(rand1) + 'mybucket' + str(rand2) file_info = FileInfo( src=self.bucket, operation_name='make_bucket', size=0, @@ -363,7 +363,7 @@ def test_bucket(self): buckets_list = [] for bucket in self.client.list_buckets().get('Buckets', []): buckets_list.append(bucket['Name']) - self.assertIn(self.bucket[:-1], buckets_list) + self.assertIn(self.bucket, buckets_list) file_info = FileInfo( src=self.bucket, operation_name='remove_bucket', size=0, @@ -372,7 +372,7 @@ def test_bucket(self): buckets_list = [] for bucket in self.client.list_buckets().get('Buckets', []): buckets_list.append(bucket['Name']) - self.assertNotIn(self.bucket[:-1], buckets_list) + self.assertNotIn(self.bucket, buckets_list) if __name__ == "__main__":