]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Smarter s3tests branch selection
authorZack Cerza <zack.cerza@inktank.com>
Wed, 22 Oct 2014 15:12:43 +0000 (09:12 -0600)
committerZack Cerza <zack.cerza@inktank.com>
Wed, 22 Oct 2014 15:13:20 +0000 (09:13 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
(cherry picked from commit 1b8d31986a5a8bc4cd9fea90eb680db3ca1866c8)

tasks/s3tests.py

index 48f49ac8b20f50b1640960480b0208a6fc08229d..bad6ea4d21d90aea266995a42c56665b61b2a44a 100644 (file)
@@ -23,7 +23,7 @@ log = logging.getLogger(__name__)
 def extract_sync_client_data(ctx, client_name):
     """
     Extract synchronized client rgw zone and rgw region information.
-    
+
     :param ctx: Context passed to the s3tests task
     :param name: Name of client that we are synching with
     """
@@ -117,7 +117,7 @@ def download(ctx, config):
     """
     Download the s3 tests from the git builder.
     Remove downloaded s3 file upon exit.
-    
+
     The context passed in should be identical to the context
     passed in to the main task.
     """
@@ -127,7 +127,14 @@ def download(ctx, config):
     for (client, cconf) in config.items():
         branch = cconf.get('force-branch', None)
         if not branch:
-            branch = cconf.get('branch', 'master')
+            ceph_branch = ctx.config.get('branch')
+            suite_branch = ctx.config.get('suite_branch', ceph_branch)
+            branch = cconf.get('branch', suite_branch)
+        if not branch:
+            raise ValueError(
+                "Could not determine what branch to use for s3tests!")
+        else:
+            log.info("Using branch '%s' for s3tests", branch)
         sha1 = cconf.get('sha1')
         ctx.cluster.only(client).run(
             args=[