From: Pritha Srivastava Date: Tue, 14 Jun 2022 05:00:22 +0000 (+0530) Subject: qa/rgw: 1. adding yaml files to integrate iam tests in teuthology. X-Git-Tag: v18.0.0~613^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e94873ad85eb16be4c1fd8ef62fcd506045e1ef0;p=ceph.git qa/rgw: 1. adding yaml files to integrate iam tests in teuthology. 2. Modifying s3tests.py for iam tests. Signed-off-by: Pritha Srivastava --- diff --git a/qa/suites/rgw/iam/% b/qa/suites/rgw/iam/% new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/qa/suites/rgw/iam/.qa b/qa/suites/rgw/iam/.qa new file mode 120000 index 000000000000..a602a0353e75 --- /dev/null +++ b/qa/suites/rgw/iam/.qa @@ -0,0 +1 @@ +../.qa/ \ No newline at end of file diff --git a/qa/suites/rgw/iam/cluster.yaml b/qa/suites/rgw/iam/cluster.yaml new file mode 120000 index 000000000000..230ff0fdab41 --- /dev/null +++ b/qa/suites/rgw/iam/cluster.yaml @@ -0,0 +1 @@ +.qa/clusters/fixed-2.yaml \ No newline at end of file diff --git a/qa/suites/rgw/iam/ignore-pg-availability.yaml b/qa/suites/rgw/iam/ignore-pg-availability.yaml new file mode 120000 index 000000000000..32340b1fa8be --- /dev/null +++ b/qa/suites/rgw/iam/ignore-pg-availability.yaml @@ -0,0 +1 @@ +.qa/rgw/ignore-pg-availability.yaml \ No newline at end of file diff --git a/qa/suites/rgw/iam/objectstore.yaml b/qa/suites/rgw/iam/objectstore.yaml new file mode 120000 index 000000000000..a59cf5175069 --- /dev/null +++ b/qa/suites/rgw/iam/objectstore.yaml @@ -0,0 +1 @@ +.qa/objectstore/bluestore-bitmap.yaml \ No newline at end of file diff --git a/qa/suites/rgw/iam/pool-type.yaml b/qa/suites/rgw/iam/pool-type.yaml new file mode 120000 index 000000000000..697b33b2043c --- /dev/null +++ b/qa/suites/rgw/iam/pool-type.yaml @@ -0,0 +1 @@ +.qa/rgw_pool_type/replicated.yaml \ No newline at end of file diff --git a/qa/suites/rgw/iam/rgw_frontend b/qa/suites/rgw/iam/rgw_frontend new file mode 120000 index 000000000000..030cd6ac8dc1 --- /dev/null +++ b/qa/suites/rgw/iam/rgw_frontend @@ -0,0 +1 @@ +.qa/rgw_frontend/ \ No newline at end of file diff --git a/qa/suites/rgw/iam/supported_random_distro$ b/qa/suites/rgw/iam/supported_random_distro$ new file mode 120000 index 000000000000..0862b4457b37 --- /dev/null +++ b/qa/suites/rgw/iam/supported_random_distro$ @@ -0,0 +1 @@ +.qa/distros/supported-random-distro$ \ No newline at end of file diff --git a/qa/suites/rgw/iam/tasks/+ b/qa/suites/rgw/iam/tasks/+ new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/qa/suites/rgw/iam/tasks/.qa b/qa/suites/rgw/iam/tasks/.qa new file mode 120000 index 000000000000..a602a0353e75 --- /dev/null +++ b/qa/suites/rgw/iam/tasks/.qa @@ -0,0 +1 @@ +../.qa/ \ No newline at end of file diff --git a/qa/suites/rgw/iam/tasks/0-install.yaml b/qa/suites/rgw/iam/tasks/0-install.yaml new file mode 100644 index 000000000000..013ccbd26fea --- /dev/null +++ b/qa/suites/rgw/iam/tasks/0-install.yaml @@ -0,0 +1,15 @@ +tasks: +- install: +- ceph: +- openssl_keys: +- rgw: + client.0: + +overrides: + ceph: + conf: + global: + osd_min_pg_log_entries: 10 + osd_max_pg_log_entries: 10 + client: + rgw lc debug interval: 10 diff --git a/qa/suites/rgw/iam/tasks/iamtests.yaml b/qa/suites/rgw/iam/tasks/iamtests.yaml new file mode 100644 index 000000000000..4285f6ccc02b --- /dev/null +++ b/qa/suites/rgw/iam/tasks/iamtests.yaml @@ -0,0 +1,7 @@ +tasks: +- s3tests: + client.0: + iam_tests: True + extra_attrs: ["test_of_iam","!fails_on_rgw"] + force-branch: ceph-master + rgw_server: client.0 \ No newline at end of file diff --git a/qa/tasks/s3tests.py b/qa/tasks/s3tests.py index 09e4defc2cd5..72214c928d17 100644 --- a/qa/tasks/s3tests.py +++ b/qa/tasks/s3tests.py @@ -98,7 +98,7 @@ def create_users(ctx, config): log.info('Creating rgw users...') testdir = teuthology.get_testdir(ctx) - if ctx.sts_variable: + if ctx.sts_variable or ctx.iam_variable: users = {'s3 main': 'foo', 's3 alt': 'bar', 's3 tenant': 'testx$tenanteduser', 'iam': 'foobar'} for client in config['clients']: s3tests_conf = config['s3tests_conf'][client] @@ -453,7 +453,7 @@ def run_tests(ctx, config): else: args += ['REQUESTS_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt'] # civetweb > 1.8 && beast parsers are strict on rfc2616 - attrs = ["!fails_on_rgw", "!lifecycle_expiration", "!fails_strict_rfc2616","!test_of_sts","!webidentity_test"] + attrs = ["!fails_on_rgw", "!lifecycle_expiration", "!fails_strict_rfc2616","!test_of_sts","!webidentity_test","!test_of_iam"] if client_config.get('calling-format') != 'ordinary': attrs += ['!fails_with_subdomain'] if not client_config.get('with-sse-s3'): @@ -582,6 +582,17 @@ def task(ctx, config): cloudtier_tests: True rgw_server: client.0 + To run any iam-tests don't forget to set a config variable named 'iam_tests' to 'True' as follows:: + + tasks: + - ceph: + - rgw: [client.0] + - s3tests: + client.0: + extra_attrs: ["test_of_iam"] + iam_tests: True + rgw_server: client.0 + """ assert hasattr(ctx, 'rgw'), 's3tests must run after the rgw task' assert config is None or isinstance(config, list) \ @@ -622,6 +633,11 @@ def task(ctx, config): else: ctx.dbstore_variable = False + if 'iam_tests' in client_config: + ctx.iam_variable = True + else: + ctx.iam_variable = False + #This will be the structure of config file when you want to run webidentity_test (sts-test) if ctx.sts_variable and "TOKEN" in os.environ: for client in clients: @@ -646,8 +662,8 @@ def task(ctx, config): } ) - elif ctx.sts_variable: - #This will be the structure of config file when you want to run assume_role_test and get_session_token_test (sts-test) + elif ctx.sts_variable or ctx.iam_variable: + #This will be the structure of config file when you want to run assume_role_test and get_session_token_test (sts-test) or iam-tests for client in clients: endpoint = ctx.rgw.role_endpoints.get(client) assert endpoint, 's3tests: no rgw endpoint for {}'.format(client)