]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Modification in the usage of force-branch 42023/head
authorKalpesh Pandya <kapandya@redhat.com>
Thu, 24 Jun 2021 18:46:53 +0000 (00:16 +0530)
committerKalpesh Pandya <kapandya@redhat.com>
Thu, 1 Jul 2021 08:24:51 +0000 (13:54 +0530)
Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
qa/suites/rgw/notifications/tasks/test_amqp.yaml
qa/suites/rgw/notifications/tasks/test_kafka.yaml
qa/suites/rgw/notifications/tasks/test_others.yaml
qa/tasks/kafka.py
qa/tasks/notification_tests.py

index e02cc8fc17bd70a1b5e7f5e2d59c10c4a98c7fa4..6807cfb65877efe57566ec7dda76fc7a777aced3 100644 (file)
@@ -3,6 +3,5 @@ tasks:
     client.0:
 - notification-tests:
     client.0:
-      force-branch: master
       extra_attr: ["amqp_test"]
       rgw_server: client.0
index 4fa0791e03218e3d876757a3baabdbfd1980da6b..ae647df386532a0d405f403644d35095d0724f19 100644 (file)
@@ -4,6 +4,5 @@ tasks:
       kafka_version: 2.6.0
 - notification-tests:
     client.0:
-      force-branch: master
       extra_attr: ["kafka_test"]
       rgw_server: client.0
index f13cac68f812fae8e9569aa77fa31f4077eaa778..793f6f430247afd6812b7801d28330e141ded7ee 100644 (file)
@@ -1,5 +1,4 @@
 tasks:
 - notification-tests:
     client.0:
-      force-branch: master
       rgw_server: client.0
index 5c121cc622619d159a7107b4ad6dd4aa690c34ed..5d185bba7507062d91736713067b366f263bdb57 100644 (file)
@@ -173,6 +173,7 @@ def task(ctx,config):
     tasks:
     - kafka:
         client.0:
+          kafka_version: 2.6.0
     """
     assert config is None or isinstance(config, list) \
         or isinstance(config, dict), \
index 5f63edac20376e585d2f86bc4d51092e5121605c..39297b42977b0db836cb9124b33c81c9b70a2916 100644 (file)
@@ -12,39 +12,26 @@ import string
 
 from teuthology import misc as teuthology
 from teuthology import contextutil
-from teuthology.config import config as teuth_config
 from teuthology.orchestra import run
 
 log = logging.getLogger(__name__)
 
+
 @contextlib.contextmanager
 def download(ctx, config):
-    """
-    Download the bucket notification tests from the git builder.
-    Remove downloaded test file upon exit.
-    The context passed in should be identical to the context
-    passed in to the main task.
-    """
     assert isinstance(config, dict)
-    log.info('Downloading bucket-notification-tests...')
+    log.info('Downloading bucket-notifications-tests...')
     testdir = teuthology.get_testdir(ctx)
+    branch = ctx.config.get('suite_branch')
+    repo = ctx.config.get('suite_repo')
+    log.info('Using branch %s from %s for bucket notifications tests', branch, repo)
     for (client, client_config) in config.items():
-        bntests_branch = client_config.get('force-branch', None)
-        if not bntests_branch:
-            raise ValueError(
-                "Could not determine what branch to use for bn-tests. Please add 'force-branch: {bn-tests branch name}' to the .yaml config for this bucket notifications tests task.")
-
-        log.info("Using branch '%s' for bucket notifications tests", bntests_branch)
-        sha1 = client_config.get('sha1')
-        git_remote = client_config.get('git_remote', teuth_config.ceph_git_base_url)
         ctx.cluster.only(client).run(
-            args=[
-                'git', 'clone',
-                '-b', bntests_branch,
-                git_remote + 'ceph.git',
-                '{tdir}/ceph'.format(tdir=testdir),
-                ],
+            args=['git', 'clone', '-b', branch, repo, '{tdir}/ceph'.format(tdir=testdir)],
             )
+
+        sha1 = client_config.get('sha1')
+
         if sha1 is not None:
             ctx.cluster.only(client).run(
                 args=[
@@ -53,6 +40,7 @@ def download(ctx, config):
                     'git', 'reset', '--hard', sha1,
                     ],
                 )
+
     try:
         yield
     finally:
@@ -258,21 +246,30 @@ def task(ctx,config):
     """
     To run bucket notification tests under Kafka endpoint the prerequisite is to run the kafka server. Also you need to pass the
     'extra_attr' to the notification tests. Following is the way how to run kafka and finally bucket notification tests::
+
     tasks:
     - kafka:
         client.0:
+          kafka_version: 2.6.0
     - notification_tests:
         client.0:
           extra_attr: ["kafka_test"]
 
     To run bucket notification tests under AMQP endpoint the prerequisite is to run the rabbitmq server. Also you need to pass the
     'extra_attr' to the notification tests. Following is the way how to run rabbitmq and finally bucket notification tests::
+
     tasks:
     - rabbitmq:
         client.0:
     - notification_tests:
         client.0:
           extra_attr: ["amqp_test"]
+
+    If you want to run the tests against your changes pushed to your remote repo you can provide 'suite_branch' and 'suite_repo'
+    parameters in your teuthology-suite command. Example command for this is as follows::
+
+    teuthology-suite --ceph-repo https://github.com/ceph/ceph-ci.git -s rgw:notifications --ceph your_ceph_branch_name -m smithi --suite-repo https://github.com/your_name/ceph.git --suite-branch your_branch_name
+    
     """
     assert config is None or isinstance(config, list) \
         or isinstance(config, dict), \