From 7df72f26522af40739a6d8c5dc512c948f9d8d2c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 30 Apr 2013 13:23:22 -0700 Subject: [PATCH] s3tests: revert useless portion of 1c50db6a4630d07e72144dafd985c397f8a42dc5 Perhaps it was attempting to debug something, but it shouldn't have been committed. Signed-off-by: Josh Durgin --- teuthology/task/s3tests.py | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/teuthology/task/s3tests.py b/teuthology/task/s3tests.py index cda6557a95d83..af08bb5d641da 100644 --- a/teuthology/task/s3tests.py +++ b/teuthology/task/s3tests.py @@ -14,8 +14,8 @@ from ..orchestra.connection import split_user log = logging.getLogger(__name__) - -def do_download(ctx, config): +@contextlib.contextmanager +def download(ctx, config): assert isinstance(config, dict) log.info('Downloading s3-tests...') testdir = teuthology.get_testdir(ctx) @@ -53,9 +53,6 @@ def do_download(ctx, config): ], ) -@contextlib.contextmanager -def download(ctx, config): - return do_download(ctx, config) def _config_user(s3tests_conf, section, user): s3tests_conf[section].setdefault('user_id', user) @@ -64,7 +61,9 @@ def _config_user(s3tests_conf, section, user): s3tests_conf[section].setdefault('access_key', ''.join(random.choice(string.uppercase) for i in xrange(20))) s3tests_conf[section].setdefault('secret_key', base64.b64encode(os.urandom(40))) -def do_create_users(ctx, config): + +@contextlib.contextmanager +def create_users(ctx, config): assert isinstance(config, dict) log.info('Creating rgw users...') testdir = teuthology.get_testdir(ctx) @@ -107,11 +106,9 @@ def do_create_users(ctx, config): ], ) -@contextlib.contextmanager -def create_users(ctx, config): - return do_create_users(ctx, config) -def do_configure(ctx, config): +@contextlib.contextmanager +def configure(ctx, config): assert isinstance(config, dict) log.info('Configuring s3-tests...') testdir = teuthology.get_testdir(ctx) @@ -148,10 +145,7 @@ def do_configure(ctx, config): yield @contextlib.contextmanager -def configure(ctx, config): - return do_configure(ctx, config) - -def do_run_tests(ctx, config): +def run_tests(ctx, config): assert isinstance(config, dict) testdir = teuthology.get_testdir(ctx) for client, client_config in config.iteritems(): @@ -169,10 +163,6 @@ def do_run_tests(ctx, config): ctx.cluster.only(client).run( args=args, ) - -@contextlib.contextmanager -def run_tests(ctx, config): - do_run_tests(ctx, config) yield @contextlib.contextmanager -- 2.39.5