]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: add test config to rgw_multisite_tests task 14688/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 16 May 2017 14:36:06 +0000 (10:36 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 18 May 2017 17:38:44 +0000 (13:38 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/suites/rgw/multisite/tasks/test_multi.yaml
qa/tasks/rgw_multisite_tests.py

index 5a4536c010ff8f641669929e3768c17b1c447deb..508c06a527011d8595d86ff8479b6ba27a6b5bfc 100644 (file)
@@ -13,3 +13,5 @@ tasks:
       valgrind: [--tool=memcheck]
 - rgw-multisite:
 - rgw-multisite-tests:
+    config:
+      reconfigure_delay: 60
index 1bb07ca594af92f41e22b8a922d14198ddf5b023..4e6e2b3dff004af425ea602f94071c52c4d61954 100644 (file)
@@ -18,11 +18,13 @@ class RGWMultisiteTests(Task):
     """
     Runs the rgw_multi tests against a multisite configuration created by the
     rgw-multisite task. Tests are run with nose, using any additional 'args'
-    provided.
+    provided. Overrides for tests.Config can be set in 'config'.
 
         - rgw-multisite-tests:
             args:
             - tasks.rgw_multi.tests:test_object_sync
+            config:
+              reconfigure_delay: 60
 
     """
     def __init__(self, ctx, config):
@@ -31,6 +33,9 @@ class RGWMultisiteTests(Task):
     def setup(self):
         super(RGWMultisiteTests, self).setup()
 
+        overrides = self.ctx.config.get('overrides', {})
+        misc.deep_merge(self.config, overrides.get('rgw-multisite-tests', {}))
+
         if not self.ctx.rgw_multisite:
             raise ConfigError('rgw-multisite-tests must run after the rgw-multisite task')
         realm = self.ctx.rgw_multisite.realm
@@ -42,12 +47,10 @@ class RGWMultisiteTests(Task):
         user.create(master_zone, ['--display-name', 'Multisite Test User',
                                   '--gen-access-key', '--gen-secret'])
 
-        tests.init_multi(realm, user)
+        config = self.config.get('config', {})
+        tests.init_multi(realm, user, tests.Config(**config))
         tests.realm_meta_checkpoint(realm)
 
-        overrides = self.ctx.config.get('overrides', {})
-        misc.deep_merge(self.config, overrides.get('rgw-multisite-tests', {}))
-
     def begin(self):
         # extra arguments for nose can be passed as a string or list
         extra_args = self.config.get('args', [])