From de836ee684ae6cf122238ad27caace615df1f3fd Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 16 May 2017 10:36:06 -0400 Subject: [PATCH] qa/rgw: add test config to rgw_multisite_tests task Signed-off-by: Casey Bodley --- qa/suites/rgw/multisite/tasks/test_multi.yaml | 2 ++ qa/tasks/rgw_multisite_tests.py | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/qa/suites/rgw/multisite/tasks/test_multi.yaml b/qa/suites/rgw/multisite/tasks/test_multi.yaml index 5a4536c010ff8..508c06a527011 100644 --- a/qa/suites/rgw/multisite/tasks/test_multi.yaml +++ b/qa/suites/rgw/multisite/tasks/test_multi.yaml @@ -13,3 +13,5 @@ tasks: valgrind: [--tool=memcheck] - rgw-multisite: - rgw-multisite-tests: + config: + reconfigure_delay: 60 diff --git a/qa/tasks/rgw_multisite_tests.py b/qa/tasks/rgw_multisite_tests.py index 1bb07ca594af9..4e6e2b3dff004 100644 --- a/qa/tasks/rgw_multisite_tests.py +++ b/qa/tasks/rgw_multisite_tests.py @@ -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', []) -- 2.39.5