rgw multisite testing
"""
import logging
-import sys
import nose.core
import nose.config
from teuthology.task import Task
from teuthology import misc
-from rgw_multi import multisite, tests
+from tasks.rgw_multi import multisite, tests, tests_ps
log = logging.getLogger(__name__)
+
class RGWMultisiteTests(Task):
"""
Runs the rgw_multi tests against a multisite configuration created by the
# run nose tests in the rgw_multi.tests module
conf = nose.config.Config(stream=get_log_stream(), verbosity=2)
+ error_msg = ''
result = nose.run(defaultTest=tests.__name__, argv=argv, config=conf)
if not result:
- raise RuntimeError('rgw multisite test failures')
+ error_msg += 'rgw multisite, '
+ result = nose.run(defaultTest=tests_ps.__name__, argv=argv, config=conf)
+ if not result:
+ error_msg += 'rgw multisite pubsub, '
+ if error_msg:
+ raise RuntimeError(error_msg + 'test failures')
+
def get_log_stream():
""" return a log stream for nose output """
return LogStream()
+
task = RGWMultisiteTests