]> git-server-git.apps.pok.os.sepia.ceph.com Git - ragweed.git/commitdiff
Bucket names cannot contain underscore 4/head
authorSoumya Koduri <skoduri@redhat.com>
Tue, 25 Jun 2019 07:15:25 +0000 (12:45 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Tue, 25 Jun 2019 07:15:25 +0000 (12:45 +0530)
As per Amazon s3 spec, bucket names cannot contain
underscore.
https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-s3-bucket-naming-requirements.html

This (along with other naming convention mentioned in the doc) are being
enforced via https://github.com/ceph/ceph/pull/26787

This patch is to correct the bucket name generated in ragweed
tests as well.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
ragweed/framework.py

index 3eaa674f5cc61ff2866411c3d21c3cf45af84a19..6a25b6baad0282a34406b60b6191667dfe9a128b 100644 (file)
@@ -294,7 +294,9 @@ class RTest:
 
     def create_bucket(self):
         bid = len(self.r_buckets) + 1
-        rb = suite.zone.create_bucket(suite.get_bucket_name(self._name + '-' + str(bid)))
+        bucket_name =  suite.get_bucket_name(self._name + '.' + str(bid))
+        bucket_name = bucket_name.replace("_", "-")
+        rb = suite.zone.create_bucket(bucket_name)
         self.r_buckets.append(rb)
 
         return rb