]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: 1. adding yaml files to integrate iam tests in teuthology. 46660/head
authorPritha Srivastava <prsrivas@redhat.com>
Tue, 14 Jun 2022 05:00:22 +0000 (10:30 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Thu, 23 Jun 2022 03:45:24 +0000 (09:15 +0530)
2. Modifying s3tests.py for iam tests.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
13 files changed:
qa/suites/rgw/iam/% [new file with mode: 0644]
qa/suites/rgw/iam/.qa [new symlink]
qa/suites/rgw/iam/cluster.yaml [new symlink]
qa/suites/rgw/iam/ignore-pg-availability.yaml [new symlink]
qa/suites/rgw/iam/objectstore.yaml [new symlink]
qa/suites/rgw/iam/pool-type.yaml [new symlink]
qa/suites/rgw/iam/rgw_frontend [new symlink]
qa/suites/rgw/iam/supported_random_distro$ [new symlink]
qa/suites/rgw/iam/tasks/+ [new file with mode: 0644]
qa/suites/rgw/iam/tasks/.qa [new symlink]
qa/suites/rgw/iam/tasks/0-install.yaml [new file with mode: 0644]
qa/suites/rgw/iam/tasks/iamtests.yaml [new file with mode: 0644]
qa/tasks/s3tests.py

diff --git a/qa/suites/rgw/iam/% b/qa/suites/rgw/iam/%
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/rgw/iam/.qa b/qa/suites/rgw/iam/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -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 (symlink)
index 0000000..230ff0f
--- /dev/null
@@ -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 (symlink)
index 0000000..32340b1
--- /dev/null
@@ -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 (symlink)
index 0000000..a59cf51
--- /dev/null
@@ -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 (symlink)
index 0000000..697b33b
--- /dev/null
@@ -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 (symlink)
index 0000000..030cd6a
--- /dev/null
@@ -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 (symlink)
index 0000000..0862b44
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/qa/suites/rgw/iam/tasks/.qa b/qa/suites/rgw/iam/tasks/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -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 (file)
index 0000000..013ccbd
--- /dev/null
@@ -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 (file)
index 0000000..4285f6c
--- /dev/null
@@ -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
index 09e4defc2cd577a7e3b317161c5566247a9f9c27..72214c928d17eeae1a49f4a772518aa587f674e1 100644 (file)
@@ -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)