]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/log
s3-tests.git
6 months agowebsite: routing_setup() as pytest fixture ceph-reef
Casey Bodley [Wed, 4 Jun 2025 22:31:39 +0000 (18:31 -0400)]
website: routing_setup() as pytest fixture

c80e9d2118ca5bcdec5285898a532f8e18faa6b6 had removed the use of
routing_setup() without adding a fixture to replace it. this had broken
routing_check(), but we hadn't noticed it because pytest hadn't
supported the 'yield' pattern in test_routing_generator() to call it

test_routing_generator() now uses this routing_setup fixture to provide
the kwargs that had previously been injected into routing_check() via
@common.with_setup_kwargs(setup=routing_setup, teardown=routing_teardown)

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9839a407c2353125bb867dec67a8f9960b1a2065)

6 months agowebsite: use pytest parametrize for test_routing_generator()
Casey Bodley [Wed, 4 Jun 2025 16:31:44 +0000 (12:31 -0400)]
website: use pytest parametrize for test_routing_generator()

resolves error with recent pytest:

==================================== ERRORS ====================================
____________ ERROR collecting s3tests/functional/test_s3_website.py ____________
'yield' keyword is allowed in fixtures, but not in tests (test_routing_generator)

use https://docs.pytest.org/en/7.1.x/example/parametrize.html instead to
generate a test_routing_generator() for each entry in ROUTING_RULES_TESTS

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d587a4a49983651258f91a8a47b7faf0e7138ec3)

10 months agoadd handling for EventStreamError exception
Gal Salomon [Wed, 17 Apr 2024 15:20:37 +0000 (18:20 +0300)]
add handling for EventStreamError exception

Signed-off-by: Gal Salomon <gal.salomon@gmail.com>
(cherry picked from commit 77f1334571416e110d27f574c7f563d8c9873d9b)

10 months agosts: remove test_get_session_token_permanent_creds_denied
Casey Bodley [Thu, 21 Nov 2024 15:52:44 +0000 (10:52 -0500)]
sts: remove test_get_session_token_permanent_creds_denied

Fixes: https://tracker.ceph.com/issues/69001
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 66e8f000c96ce3ebb8dd353b0155d893bc454947)

10 months agoPublicAccessBlock: test access deny via bucket policy
Seena Fallah [Mon, 19 Feb 2024 21:43:43 +0000 (22:43 +0100)]
PublicAccessBlock: test access deny via bucket policy

Make sure 403 is returned when access is denied via s3:GetBucketPublicAccessBlock action on GetBucketPublicAccessBlock

Refs: https://github.com/ceph/ceph/pull/55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3af42312bf4870e507e883748314946dd0b01859)

10 months agoPublicAccessBlock: test 404 on no block configuration
Seena Fallah [Mon, 19 Feb 2024 21:40:12 +0000 (22:40 +0100)]
PublicAccessBlock: test 404 on no block configuration

Make sure NoSuchPublicAccessBlockConfiguration is returned when no public block is configured on bucket:

Refs: https://github.com/ceph/ceph/pull/55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3056e6d0394987d20ba6c363f238c4922e5cbcab)

10 months agorgw/s3tests: making the tests generic to check only
Pritha Srivastava [Wed, 20 Nov 2024 04:12:18 +0000 (09:42 +0530)]
rgw/s3tests: making the tests generic to check only
for 403 error code (and not specific errors) so that
the tests pass for any order of auth engines.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 14f5672d097f7b5c820526179b45adf11271036c)

17 months agorequirements: unpin pytz version
Casey Bodley [Mon, 24 Jun 2024 17:26:23 +0000 (13:26 -0400)]
requirements: unpin pytz version

Fixes: https://tracker.ceph.com/issues/66655
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 27f24ee4d71d18940629e274417d3747e4d61883)

20 months agotest etag on mpu complete replies
Yuval Lifshitz [Mon, 25 Mar 2024 16:45:06 +0000 (16:45 +0000)]
test etag on mpu complete replies

this is to cover the fix of: https://tracker.ceph.com/issues/58879

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
(cherry picked from commit a28d46fa2aa5cdc4fb36e543cdbde188115be989)

21 months agotest_headers: use fixture to hook request headers
Casey Bodley [Sun, 10 Mar 2024 14:39:26 +0000 (10:39 -0400)]
test_headers: use fixture to hook request headers

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit aecd282a11c93dd01c8ad95fe47c33a8b26a365b)

22 months agoreplace datetime.now with datetime.utcnow()
Ali Maredia [Tue, 20 Feb 2024 17:17:32 +0000 (12:17 -0500)]
replace datetime.now with datetime.utcnow()

when the local timezone is not UTC and if it is a day behind,
lifecycle_header tests fails with 2 days not equal to 1
so replacing datetime.now() with datetime.utcnow()

Signed-off-by: Ali Maredia <amaredia@redhat.com>
(cherry picked from commit 4744808eda28efca75b180c5d5ef1a5ebf24043f)

2 years agoAdd test to verify HTTP OPTIONS on presigned URL
Tobias Urdin [Wed, 2 Aug 2023 09:28:20 +0000 (09:28 +0000)]
Add test to verify HTTP OPTIONS on presigned URL

Related: https://tracker.ceph.com/issues/62033

Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
(cherry picked from commit c0a1880d4cd3b7c7469edd5ba91def29d871e9c8)

2 years agoadding tests per JSON input types, which includes various SQL operators.
galsalomon66 [Mon, 15 May 2023 21:26:19 +0000 (00:26 +0300)]
adding tests per JSON input types, which includes various SQL operators.
alignment of some of the test routines upon removing the XML tags(<Payload><Records><Payload>) from the s3select results. (Json s3tests #506)

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit 6919f633242e9878f20d72d172aa87bc401d38a2)

2 years agos3website: collections.Container removed from python3.10
Casey Bodley [Sun, 12 Mar 2023 19:33:34 +0000 (15:33 -0400)]
s3website: collections.Container removed from python3.10

Fixes: https://tracker.ceph.com/issues/58960
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 97c0338adfa8c0d51b1c24ba69882218fc7c23e9)

2 years agolifecycle: Fix test_lifecycle_expiration_header_* testcases
Soumya Koduri [Tue, 7 Mar 2023 09:47:47 +0000 (15:17 +0530)]
lifecycle: Fix test_lifecycle_expiration_header_* testcases

Few checks were incorrectly mapped when switched to 'assert'. This
commit fixes the same.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 29b0e27e495fca140669f45cd51c7b172f41410a)

2 years agodbstore: add back missing 'fails_on_dbstore' tag
Soumya Koduri [Mon, 6 Mar 2023 14:18:01 +0000 (19:48 +0530)]
dbstore: add back missing 'fails_on_dbstore' tag

Mark testcase "test_lifecycle_expiration_header_and_tags_head" as
fails_on_dbstore

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit d976f47d747867b6dc1f5eedba4626dd670093b9)
(cherry picked from commit 02fdf70f0ac58d254ae3c40d2fc3b15d27c4cbf4)

2 years agoQoL: Fix tox.ini syntax and other minor things
Moritz Röhrich [Tue, 28 Feb 2023 11:19:54 +0000 (12:19 +0100)]
QoL: Fix tox.ini syntax and other minor things

- Fix tox.ini syntax

Modern tox versions require the expected environment variables to be
listed one by one on separate lines in tox.ini

- Add `venv` to list of ignored names for git

This is a common name for a local Python virtual environment. Less
typing than `virtualenv`

- Add `tox` to requirements.txt

Installing `tox` via `pip` has the advantage of including it in the
virtual environment, thus avoiding trouble on operating systems shipping
by default with python3.6 or older. It's also nice that `pip install -r
requirements.txt` is now sufficient to set up the testing environment,
after initializing the virtual environment with a moder-enough python
version.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
(cherry picked from commit 3a0f1f0ead196c67721e94a19544aad19846f039)
(cherry picked from commit 7fadea74165dc1d117587e0d16f934aa95d6447d)

2 years agoboto3: list_versions() omits empty KeyMarker/VersionIdMarker
Casey Bodley [Fri, 17 Feb 2023 02:15:19 +0000 (21:15 -0500)]
boto3: list_versions() omits empty KeyMarker/VersionIdMarker

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit a536dd0e88ac908cde07bf312c8db6fe4a0c9b69)
(cherry picked from commit e5dabbe45d2ec3520b30d62c9763b089ecaf5562)

2 years agoiam: add back missing fails_on_dbstore tags
Casey Bodley [Fri, 24 Feb 2023 16:43:52 +0000 (11:43 -0500)]
iam: add back missing fails_on_dbstore tags

Fixes: https://tracker.ceph.com/issues/58762
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 5219b86db9677983a299be9065bf9e846333c49a)

2 years agobetter error handling in the STS tests
Yuval Lifshitz [Wed, 25 Jan 2023 09:12:20 +0000 (11:12 +0200)]
better error handling in the STS tests

also, give more accurate instruction on how to run the tests

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit 3437cda73df02dd9f4f417b9e3b18396b77a8045)

2 years agotest_post_object_upload_size_rgw_chunk_size_bug: new testcase
Robin H. Johnson [Wed, 1 Feb 2023 00:39:39 +0000 (16:39 -0800)]
test_post_object_upload_size_rgw_chunk_size_bug: new testcase

`ERR_TOO_SMALL` is wrongly returned if all of the following are true,
- the get_data returns multiple items (chunks)
- the length of the last item is smaller than the POST Policy's min
  value for content-length-range.

The check should be `(ofs < min_len)` instead of `(len < min_len)`

This is further confirmed by the next line of `s->obj_size = ofs`

Move the `int len` scope inside loop to try and prevent the bug in
future.

The bug was refactored in 2016, but was introduced in Oct 2012, when
this functionality was first added to RGW in commit 7bb3504d3f0974e9863f536e9af0ce8889d6888f.

Reference: https://github.com/ceph/ceph/blob/933a42f9af349b3b222270e7f19f1fe151d89e8e/src/rgw/rgw_op.cc#L4474-L4513
Reference: https://github.com/ceph/ceph/commit/7bb3504d3f0974e9863f536e9af0ce8889d6888f
Signed-off-by: Robin H. Johnson <rjohnson@digitalocean.com>
(cherry picked from commit 5914eb2005bcdfc27dfa6221744c58e967a44e76)

2 years agotest_s3: remove test_user_policy()
Casey Bodley [Thu, 26 Jan 2023 16:23:03 +0000 (11:23 -0500)]
test_s3: remove test_user_policy()

this has been failing consistently in local testing. test_sts.py has
lots of user policy test coverage, so this test case in test_s3.py is
superfluous

Fixes: https://tracker.ceph.com/issues/58365
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 18a41ab63fe8a071738da7145d4bbebb2ee94255)

2 years agotest_headers: add custom marks for auth_common/aws2/aws4
Casey Bodley [Wed, 25 Jan 2023 22:04:04 +0000 (17:04 -0500)]
test_headers: add custom marks for auth_common/aws2/aws4

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7993dd02a53c83e5831fc62d954621f7aca92bf5)

2 years agoremove boostrap
Casey Bodley [Sun, 22 Jan 2023 16:50:40 +0000 (11:50 -0500)]
remove boostrap

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 5e9f6e5ffb6affcd5ecdaf5e6de3de9489488e00)

2 years agocleanup duplicate lines
Casey Bodley [Sun, 22 Jan 2023 00:48:29 +0000 (19:48 -0500)]
cleanup duplicate lines

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d13ed28a5c1a4e4a694eb6950a7be687050d385c)

2 years agoremove nose dependency from requirements.txt
Casey Bodley [Sat, 21 Jan 2023 19:25:30 +0000 (14:25 -0500)]
remove nose dependency from requirements.txt

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 494379c2ff93dcf72e5c5638522073ad9d88389a)

2 years agonose: remove nose attrs and imports
Casey Bodley [Sat, 21 Jan 2023 19:24:31 +0000 (14:24 -0500)]
nose: remove nose attrs and imports

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 4c75fba0deada0f0db6dddf9d7445b9f10c18fcb)

2 years agopytest: replace nose eq() with assert ==
Casey Bodley [Sat, 21 Jan 2023 19:05:46 +0000 (14:05 -0500)]
pytest: replace nose eq() with assert ==

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit f5d0bc9be3a24e91142ad8359b1c64e655aaee48)

2 years agopytest: replace nose SkipTest with pytest.skip()
Casey Bodley [Sat, 21 Jan 2023 18:37:40 +0000 (13:37 -0500)]
pytest: replace nose SkipTest with pytest.skip()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7e7e8d5a4237414d7cec891fbb6573215a236597)

2 years agopytest: replace @nose.with_setup with fixtures
Casey Bodley [Fri, 20 Jan 2023 22:04:30 +0000 (17:04 -0500)]
pytest: replace @nose.with_setup with fixtures

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit c80e9d2118ca5bcdec5285898a532f8e18faa6b6)

2 years agopytest: add custom marks for each nose @attr
Casey Bodley [Fri, 20 Jan 2023 19:35:45 +0000 (14:35 -0500)]
pytest: add custom marks for each nose @attr

and register them in pytest.ini

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 4864dbc340dff24370fb01c0af04b44bf00d5e47)

2 years agoremove tests tagged fails_strict_rfc2616
Casey Bodley [Fri, 20 Jan 2023 20:34:47 +0000 (15:34 -0500)]
remove tests tagged fails_strict_rfc2616

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 3652cfe2ec5500b37adf7830acc1d957f71b5a9e)

2 years agopytest: add global configfile and autouse teardown fixtures
Casey Bodley [Fri, 20 Jan 2023 19:44:08 +0000 (14:44 -0500)]
pytest: add global configfile and autouse teardown fixtures

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 672a1233485926b1e9fdcb4170cb7b4e3abcb30b)

2 years agopytest: add tox.ini to run pytest, update README
Casey Bodley [Fri, 20 Jan 2023 20:24:07 +0000 (15:24 -0500)]
pytest: add tox.ini to run pytest, update README

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9319a41b245387e79a0801f97ee5119cc4df9bf3)

3 years agopin botocore to resolve v2 signature failures
Casey Bodley [Tue, 22 Nov 2022 19:32:57 +0000 (14:32 -0500)]
pin botocore to resolve v2 signature failures

Signed-off-by: Casey Bodley <cbodley@redhat.com>
3 years agoremove comment
galsalomon66 [Mon, 17 Oct 2022 21:37:29 +0000 (00:37 +0300)]
remove comment

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit 60b26f210e0114b60a54426a3db3087c668de676)

3 years agothe use of std::to_string change the double presentation(not accuracy)
galsalomon66 [Sun, 18 Sep 2022 07:46:04 +0000 (10:46 +0300)]
the use of std::to_string change the double presentation(not accuracy)

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit b20001356520256db522f9b7c4f392dbc085a4dd)

3 years agothe upgraded CSV parser has some impact on engine result. (redundant comma, quote...
galsalomon66 [Mon, 12 Sep 2022 12:33:35 +0000 (15:33 +0300)]
the upgraded CSV parser has some impact on engine result. (redundant comma, quote behavior)

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit 89f97ed35cdc8e74d98eb9518f32b994a18ac51a)

3 years agoadd test_object_copy_16m to test refcounting of tail objects
Casey Bodley [Fri, 30 Sep 2022 16:28:28 +0000 (12:28 -0400)]
add test_object_copy_16m to test refcounting of tail objects

i don't think any of our CopyObj test cases were large enough to have
tail objects, so weren't exercising our tail object ref counting
strategy

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit defb8eb9778a338d855d8fa8aa3e8f8b1b468630)

3 years agocloud-transition: Adjust lc wait time
Soumya Koduri [Mon, 5 Sep 2022 08:42:03 +0000 (14:12 +0530)]
cloud-transition: Adjust lc wait time

Fixes: https://tracker.ceph.com/issues/57401
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 774172ad43624cbb143cfc342cf4854b9522b7c0)

3 years agoAdd support for rocky linux
Zuhair AlSader [Wed, 13 Apr 2022 04:10:53 +0000 (00:10 -0400)]
Add support for rocky linux

Signed-off-by: Zuhair AlSader <zuhair.alsader@seagate.com>
(cherry picked from commit ad999de7c434754bfd81446ca5faa2275037e308)

3 years agodbstore: Update the tests marked 'fails_on_dbstore'
Soumya Koduri [Wed, 15 Jun 2022 18:38:35 +0000 (00:08 +0530)]
dbstore: Update the tests marked 'fails_on_dbstore'

Tag/Untag testcases failing on dbstore as per latest run against main

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit a8ee73273278d96f813a3284801a1a78ca58691a)

3 years agoTest case for locked and "marked-deleted" object version removal.
Igor Fedotov [Fri, 15 Jul 2022 15:55:51 +0000 (18:55 +0300)]
Test case for locked and "marked-deleted" object version removal.

Reproduces: https://tracker.ceph.com/issues/55766
Signed-off by: Igor Fedotov <igor.fedotov@croit.io>

3 years agorgw/s3_boto3: Added http status code verification for DeleteBucketTagging
Shriya Deshmukh [Wed, 27 Jul 2022 14:43:11 +0000 (08:43 -0600)]
rgw/s3_boto3: Added http status code verification for DeleteBucketTagging
case.

Updated test_set_bucket_tagging test for verifying the http status code
for DeleteBucketTagging case.

Related CEPH PR: https://github.com/ceph/ceph/pull/47262

Signed-off-by: Shriya Deshmukh <shriya.deshmukh@seagate.com>
(cherry picked from commit c8fc8cd7c8a38c0d47b6b4fd8ee2f70f57382bdd)

3 years agoFix User Policy test failures on dbstore
Soumya Koduri [Wed, 20 Jul 2022 16:26:28 +0000 (21:56 +0530)]
Fix User Policy test failures on dbstore

Tag User policy tests failing on dbstore as 'fails_on_dbstore'

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 5d63ebf83dbdee52d9795943964086c522f736cb)

3 years agoAdded put/get/list/delete User Policy Tests
Ravindra Choudhari [Mon, 27 Jun 2022 06:24:27 +0000 (11:54 +0530)]
Added put/get/list/delete User Policy Tests

c4d30d7 Ravindra Choudhari Mon, 27 Jun 2022 removing region name
4a13f58 Ravindra Choudhari Thu, 16 Jun 2022 Updating readme file (#15)
18bc152 Ravindra Choudhari Tue, 14 Jun 2022 Adding attr test_of_iam to all user policy tests (#13)
03f520a Ravindra Choudhari Tue, 14 Jun 2022 resolving review comments (#12)
7cf2823 Ravindra Choudhari Mon, 13 Jun 2022 added IAM policy test section in README.rst (#11)
563f3ea Ravindra Choudhari Fri, 10 Jun 2022 adding failing three tests back with attr @fails_on_rgw (#10)
696dd2e Ravindra Choudhari  Mon, 6 Jun 2022 changes as per review comments
3d63dfd Ravindra Choudhari  Mon, 6 Jun 2022 Fixed review comments (#8)
9492f69 Ravindra Choudhari Fri, 3 Jun 2022 Fixed review comments (#7)
74095dc Ketan Arlulkar      Wed, 1 Jun 2022 Fixed review comments (#6)
942fb4f Ketan Arlulkar      Wed, 1 Jun 2022 Added Tests for conflicting policies and IAM actions (#4)
ad5b5ae Ravindra Choudhari  Tue, 31 May 2022 IAM policies s3 actions (#5)
6515ec6 Ketan Arlulkar      Fri, 27 May 2022 Corrected eq import
40a2841 Ravindra Choudhari  Tue, 17 May 2022 resolving conflicts
f53a5c1 Ravindra Choudhari  Tue, 17 May 2022 added cleanup
747d563 Ketan Arlulkar      Tue, 17 May 2022 Added cleanup/Delete Policy
d1cc1d8 Ketan Arlulkar      Mon, 16 May 2022 Fixed review comments
1ec43a2 Ravindra Choudhari  Mon, 16 May 2022 delete user policy tests
a01722e Ravindra Choudhari  Mon, 16 May 2022 get user policy tests
ff9d676 Ketan Arlulkar      Fri, 13 May 2022 Removed TEST IDs
d261400 Ketan Arlulkar      Tue, 10 May 2022 Put User Policy & List User Policy Tests

Signed-off-by: Ravindra Choudhari <ravindra.choudhari@seagate.com>
(cherry picked from commit bf889041c9176997112cda7ece4dbf8c4ce442cd)

3 years agoremove tests that fail on boto3's parameter validation
Casey Bodley [Thu, 2 Jun 2022 16:25:24 +0000 (12:25 -0400)]
remove tests that fail on boto3's parameter validation

Fixes: https://tracker.ceph.com/issues/55193
Signed-off-by: Casey Bodley <cbodley@redhat.com>
3 years agofix GetBucketTagging error code
Casey Bodley [Wed, 18 May 2022 13:40:14 +0000 (09:40 -0400)]
fix GetBucketTagging error code

related to https://tracker.ceph.com/issues/55460

Signed-off-by: Casey Bodley <cbodley@redhat.com>
3 years agoTag sse* tests with 'fails_on_dbstore' attr
Soumya Koduri [Tue, 10 May 2022 19:21:42 +0000 (00:51 +0530)]
Tag sse* tests with 'fails_on_dbstore' attr

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 33afb4eb88c5c91caaee6bc178f44c45c052c0e8)

3 years agoAdjust wait time for cloud-transition test failures
Soumya Koduri [Wed, 13 Apr 2022 09:58:00 +0000 (15:28 +0530)]
Adjust wait time for cloud-transition test failures

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 25d05a194b09fd35acba5546ac4ebfca64759b1b)

3 years agos3tests.conf.SAMPLE: comment out [s3 cloud] section
Casey Bodley [Mon, 9 May 2022 21:19:44 +0000 (17:19 -0400)]
s3tests.conf.SAMPLE: comment out [s3 cloud] section

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9f1f9c927336700a2438645479f29408cc232af2)

3 years agosse s3 jumbo patch - all in one fixes for sse-s3 logic
Priya Sehgal [Fri, 30 Jul 2021 11:54:16 +0000 (17:24 +0530)]
sse s3 jumbo patch - all in one fixes for sse-s3 logic

original tests by Priya Sehgal <priya.sehgal@flipkart.com>:
rgw/s3_boto3: Tests added for SSE-S3 (GET, PUT, HEAD, MPU).

Additions by Casey Bodley <cbodley@redhat.com>:
add 'sse-s3' tag to test cases
sse: add _put_bucket_encryption() helper function
sse: document test cases with default bucket encryption
sse: expects encryption response header on put/get
sse: add 8MB default-encrypted upload
sse: test uploads that request x-amz-server-side-encryption=AES256

Lastly all my changes (Marcus Watts <mwatts@redhat.com>):

remove obsolete test - do it only in boto3 now.

Combine or rename duplicated function names.
Giving more than one test the same name is a Bad Thing(tm).

sse: expand test_bucket_policy_put_obj_enc, and _put_bucket_encryption

test_bucket_policy_put_obj_enc was testing too many things at once.
new tests:

* customer encryption and sse-s3: should fail
* customer encryption and sse-kms: should fail
* deny if not sse-s3: no-enc fails, sse-s3 succeeds.
* deny if not sse-s3: kms fails
  deny if not sse-ksm: no-enc fails, sse-kms succeeds.
  deny if not sse-ksm: s3 fails

_put_bucket_encryption was only testing sse-s3.
* test both these variations: sse-s3 and sse-kms

Note:
* these tests will fail on pre-sse-s3 ceph.

python3: comment out all boto3.set_stream_logger() calls
They made too much output.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit dd7cac25f54d5642f46d1a4a68603384c4fb3048)

3 years agoTag testcases failing on dbstore with 'fails_on_dbstore' attr
Soumya Koduri [Wed, 13 Apr 2022 09:58:00 +0000 (15:28 +0530)]
Tag testcases failing on dbstore with 'fails_on_dbstore' attr

To be able to successfully run s3tests on dbstore backend in teuthology,
mark all the s3-tests currently failing on it with 'fails_on_dbstore' attr

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agolifecycle: Adjust lc wait time
Soumya Koduri [Mon, 21 Mar 2022 19:21:30 +0000 (00:51 +0530)]
lifecycle: Adjust lc wait time

Adjust wait time to fix spurious failures reported -
https://github.com/ceph/ceph/pull/40703#issuecomment-1060811704
http://qa-proxy.ceph.com/teuthology/mbenjamin-2022-02-23_15:42:19-rgw-wip-rgwlc-noreset-distro-basic-smithi/6703349/teuthology.log

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agoImproving check_grants reliability
Pragadeeswaran Sathyanarayanan [Tue, 28 Dec 2021 15:26:23 +0000 (20:56 +0530)]
Improving check_grants reliability

Signed-off-by: Pragadeeswaran Sathyanarayanan <psathyan@redhat.com>
(cherry picked from commit 5f96a32045aa50da674df000f462def06308e10b)

3 years agolifecycle/deletemarker_expiration: Increase timer window
Soumya Koduri [Mon, 7 Feb 2022 17:54:34 +0000 (23:24 +0530)]
lifecycle/deletemarker_expiration: Increase timer window

Increase wait time in test_lifecycle_deletemarker_expiration(..)
to avoid any spurious failure.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agoEnable lifecycle tests
Soumya Koduri [Fri, 17 Dec 2021 11:25:49 +0000 (16:55 +0530)]
Enable lifecycle tests

Add an option to configure lc debug interval and adjust lifecycle
tests sleep as per the value set.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agoAdd testcases for rgw cloudtransition feature
Soumya Koduri [Mon, 6 Dec 2021 05:23:18 +0000 (10:53 +0530)]
Add testcases for rgw cloudtransition feature

Feature PR: https://github.com/ceph/ceph/pull/35100

Also ported lc testcases from boto2 to boto3

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agotest_sts: Changing code for proper cleanup
Kalpesh Pandya [Thu, 6 Jan 2022 07:29:49 +0000 (12:59 +0530)]
test_sts: Changing code for proper cleanup

This solves: https://tracker.ceph.com/issues/53090

The solution is: We need to delete the role_policy and
user_policy attached user which was causing the failure.

Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
3 years agorevert the arrow installation(causing failure on some distro"s, such as fedora)
gal salomon [Wed, 12 Jan 2022 17:01:06 +0000 (19:01 +0200)]
revert the arrow installation(causing failure on some distro"s, such as fedora)

Signed-off-by: gal salomon <gal.salomon@gmail.com>
3 years agofix output-serialization tests(upon comparing query results need to remove redundant...
gal salomon [Tue, 28 Dec 2021 15:08:17 +0000 (17:08 +0200)]
fix output-serialization tests(upon comparing query results need to remove redundant columns)

skip output-serial test. the results from both queries are not equal, thus it raise an assert. the problem seems to be the formatting before the comparision

remove test_output_serial_expressions until fixing the test

experiment pyarrow for parquet testing, adding arrow/parquet to bootstrap, installing pyarrow,pandas for reading/writing parquet

Signed-off-by: gal salomon <gal.salomon@gmail.com>
3 years agomerging master tests into parquet branch
gal salomon [Mon, 27 Dec 2021 19:46:59 +0000 (21:46 +0200)]
merging master tests into parquet branch

Signed-off-by: gal salomon <gal.salomon@gmail.com>
3 years agofix for assert of error messages
gal salomon [Tue, 21 Dec 2021 08:02:42 +0000 (10:02 +0200)]
fix for assert of error messages

Signed-off-by: gal salomon <gal.salomon@gmail.com>
3 years agoremove redundant comma. s3select-engine produced redundant result column before...
gal salomon [Tue, 7 Dec 2021 15:02:21 +0000 (17:02 +0200)]
remove redundant comma.  s3select-engine produced redundant result column before its last fix, s3tests should align with that

Signed-off-by: gal salomon <gal.salomon@gmail.com>
3 years agoTest expiration header for lc rules with tags
Or Friedmann [Wed, 30 Sep 2020 13:25:22 +0000 (16:25 +0300)]
Test expiration header for lc rules with tags

Signed-off-by: Or Friedmann <ofriedma@redhat.com>
3 years agoTest list_objects_v2 KeyCount with Delimiter
胡玮文 [Thu, 24 Sep 2020 16:28:06 +0000 (00:28 +0800)]
Test list_objects_v2 KeyCount with Delimiter

Test for: https://github.com/ceph/ceph/pull/37396

Signed-off-by: 胡玮文 <huww98@outlook.com>
4 years agoadding datatime queries from #395
galsalomon66 [Thu, 25 Nov 2021 09:57:52 +0000 (11:57 +0200)]
adding datatime queries from #395

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit 23be1160f5a39a6f16ead172b09a5c0504b7012d)

4 years agorollback to use like without escape syntax (explore valgrind issue)
galsalomon66 [Fri, 12 Nov 2021 09:39:45 +0000 (11:39 +0200)]
rollback to use like without escape syntax (explore valgrind issue)

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit eef8d0fa6759e80df6c58a1afb874315b91334ff)

4 years agomodify the queries syntax to like-escape; the queries semantics is the same; results...
galsalomon66 [Thu, 11 Nov 2021 14:15:49 +0000 (16:15 +0200)]
modify the queries syntax to like-escape; the queries semantics is the same; results are the same; it is a part of exploring valgrind issue around like-operator

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit f51101d7527dc2ccec0b0d4b978da81041ea09f8)

4 years agoadd output-serialization tests; add syntax-error tests; run_s3select_output should...
galsalomon66 [Thu, 21 Oct 2021 00:32:57 +0000 (03:32 +0300)]
add output-serialization tests; add syntax-error tests; run_s3select_output should merge into run_s3select

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit 749e29185b5de8c01d4412626ae3c45a48f5c064)

4 years agoremove comments from the like-expressions
gal salomon [Sun, 17 Oct 2021 11:03:39 +0000 (14:03 +0300)]
remove comments from the like-expressions

Signed-off-by: gal salomon <gal.salomon@gmail.com>
(cherry picked from commit 7c07bad9306f0920d7d17049647437c6fb1409a8)

4 years agosearch for the cause of the valgrind issue; remove the like expression that may cause it
galsalomon66 [Tue, 27 Jul 2021 05:26:28 +0000 (08:26 +0300)]
search for the cause of the valgrind issue; remove the like expression that may cause it

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit 723853fd189fe741b78cac5b4e780158b860d0e8)

4 years agos3select: test progress stats
Albin Antony [Wed, 30 Jun 2021 15:36:07 +0000 (21:06 +0530)]
s3select: test progress stats

Signed-off-by: Albin Antony <aantony@redhat.com>
(cherry picked from commit a3447c50dfae2fa0ac025397de8a83cc4df3fd97)

4 years agos3select: align s3select tests with ceph
Albin Antony [Tue, 18 May 2021 02:09:22 +0000 (07:39 +0530)]
s3select: align s3select tests with ceph

Update s3-tests to handle the error-response (return 400, and error-description)

Signed-off-by: Albin Antony <aantony@redhat.com>
4 years agocheck Owner/Initiator fields of ListMultipartUploads response
Casey Bodley [Fri, 29 Oct 2021 17:06:30 +0000 (13:06 -0400)]
check Owner/Initiator fields of ListMultipartUploads response

new test case test_list_multipart_upload_owner() uses two different
users to initiate multipart uploads, then tests that
list_multipart_uploads() shows the correct user ids and display names
for each upload

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 490d0a4c4f91faf2a5213c95c4b92f7c3c94c878)

4 years agochore:Removes unused scaffolds
iraj465 [Thu, 15 Jul 2021 21:59:36 +0000 (03:29 +0530)]
chore:Removes unused scaffolds

(cherry picked from commit d2a7ed88f169fd4ea9864b7fc640ddfe5518a19c)

4 years agorgw/boto3_s3:Adds delete_objects key limit for list-objects-v2
iraj465 [Thu, 15 Jul 2021 21:45:53 +0000 (03:15 +0530)]
rgw/boto3_s3:Adds delete_objects key limit for list-objects-v2

(cherry picked from commit 459e3c870a8b9bed7a47f354390b1343acb32708)

4 years agochore:Bump the list-objects to paginator
iraj465 [Thu, 15 Jul 2021 21:37:21 +0000 (03:07 +0530)]
chore:Bump the list-objects to paginator

(cherry picked from commit 20aa9aa071e704020c7fbf1b95f447cb7f33a763)

4 years agorgw/s3_boto3:Adds new delete_objects tests for checking key delete limit
iraj465 [Tue, 13 Jul 2021 17:50:35 +0000 (23:20 +0530)]
rgw/s3_boto3:Adds new delete_objects tests for checking key delete limit

(cherry picked from commit 64bdc3beec46bb5e786146629430fa54d417cd36)

4 years agorgw/sts: test to use role tag as iam:ResourceTag in
Pritha Srivastava [Fri, 23 Jul 2021 06:38:07 +0000 (12:08 +0530)]
rgw/sts: test to use role tag as iam:ResourceTag in
role's trust policy.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 71266fede99e585875128106c5d319ddbd08d1b4)

4 years agorgw/sts: test for s3:ResourceTag in role's permission policy
Pritha Srivastava [Fri, 16 Jul 2021 07:47:54 +0000 (13:17 +0530)]
rgw/sts: test for s3:ResourceTag in role's permission policy

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 5dcc3dd689486ac759092a2bd3307c469bf0c7e1)

4 years agorgw/sts: adding test for aws:TagKeys that can be used in the
Pritha Srivastava [Thu, 15 Jul 2021 10:10:04 +0000 (15:40 +0530)]
rgw/sts: adding test for aws:TagKeys that can be used in the
condition element of the role's trust policy and the role's
permission policy.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit bf43a4a10a2eea15ae0c0c06fe9f16c1893d4115)

4 years agorgw/sts: adding test for aws:PrincipalTag in role permission
Pritha Srivastava [Thu, 15 Jul 2021 08:45:54 +0000 (14:15 +0530)]
rgw/sts: adding test for aws:PrincipalTag in role permission
policy.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 86fecf83b90b247a26e0f69203b7c3844b090af2)

4 years agorgw/sts: adding test to check for aws:RequestTag
Pritha Srivastava [Thu, 15 Jul 2021 08:03:08 +0000 (13:33 +0530)]
rgw/sts: adding test to check for aws:RequestTag
in the condition element of a role's trust policy.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 64068d7bf922ee349c9e47b103b17e5ded0a5450)

4 years agorgw/sts: adding tests for testing assumerolewithwebidentity
Pritha Srivastava [Wed, 14 Jul 2021 10:10:39 +0000 (15:40 +0530)]
rgw/sts: adding tests for testing assumerolewithwebidentity
using 'sub' and 'azp' fields in the web token.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit d466b7bd09b94159526164430dde2f3d9bbce1ca)

4 years agodocs: fix wrong example in README.rst
Liu Lan [Mon, 6 Sep 2021 11:25:09 +0000 (19:25 +0800)]
docs: fix wrong example in README.rst

Run: S3TEST_CONF=your.conf ./virtualenv/bin/nosetests s3tests.functional.test_s3:test_bucket_list_empty

But get an error: "ERROR: Failure: ValueError (No such test test_bucket_list_empty)".

Because test_bucket_list_empty is a test case in s3tests_boto3 directory.

Signed-off-by: Liu Lan <liulan_yewu@cmss.chinamobile.com>
(cherry picked from commit 9ac8aef12bfeb0778a7b410bcf51e26c81565aec)

4 years agoMerge pull request #390 from mkogan1/multipart-extra-complete
Mark Kogan [Mon, 23 Aug 2021 15:06:58 +0000 (18:06 +0300)]
Merge pull request #390 from mkogan1/multipart-extra-complete

test extra complete_multipart_upload()

4 years agoobject-lock: test changes between retention modes ceph-master-new
Casey Bodley [Tue, 3 Aug 2021 21:04:15 +0000 (17:04 -0400)]
object-lock: test changes between retention modes

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 8662815ebe2d8b105307edccf56b11ebb7b6824f)

4 years agonuke_prefixed_buckets waits up to 60 seconds for object locks to expire
Casey Bodley [Wed, 4 Aug 2021 19:00:04 +0000 (15:00 -0400)]
nuke_prefixed_buckets waits up to 60 seconds for object locks to expire

objects locked in GOVERNANCE mode can be removed with
BypassGovernanceRetention, but some tests may leave an object locked in
COMPLIANCE mode, which blocks deletion until the retention period
expires

nuke_prefixed_buckets now checks the retention policy of objects that it
fails to delete with AccessDenied, and will wait up to 60 seconds for
locks to expire before retrying the deletes. if the wait exceeds 60
seconds, it instead throws an error without deleting the bucket

instead of doing this in nuke_prefixed_buckets, we could potentially
have each object-lock test case handle this manually, but that would
add a separate delay to each test case

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9c4f15a47e1ee899a7dc453a4971a164e10521d8)

4 years agonuke_prefixed_buckets deletes objects in batches
Casey Bodley [Wed, 4 Aug 2021 17:56:39 +0000 (13:56 -0400)]
nuke_prefixed_buckets deletes objects in batches

speed up the cleanup by using delete_objects() with batches of 128

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit bb995c2aeb8fbbf7c5a9547827b0afa9e1ad15ac)

4 years agorgw/s3_boto3: Add tests for bucket encryption APIs
Rahul Dev Parashar [Mon, 26 Jul 2021 10:45:02 +0000 (16:15 +0530)]
rgw/s3_boto3: Add tests for bucket encryption APIs

Tests are added for GetBucketEncryption, PutBucketEncryption,
and DeleteBucketEncryption APIs.

Related PR: https://github.com/ceph/ceph/pull/42222

Signed-off-by: Rahul Dev Parashar <rahul.dev@flipkart.com>
(cherry picked from commit 44643af0b0e51e6550e508d6854bd576d254141d)

4 years agorgw/sts: Addition of new STS tests for testing
Kalpesh Pandya [Tue, 6 Jul 2021 06:51:33 +0000 (12:21 +0530)]
rgw/sts: Addition of new STS tests for testing
session policies alongwith role's permission policy
and bucket policy.

Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 245a93326ed9d0c091744d28ffb697ac5ba74544)

4 years agorgw/s3_boto3:Adds lifecycle transition test for invalid iso8601 date
iraj465 [Tue, 13 Jul 2021 17:44:51 +0000 (23:14 +0530)]
rgw/s3_boto3:Adds lifecycle transition test for invalid iso8601 date

(cherry picked from commit ba9525f425f7da4c93d12499fffbb0faaab0ef7c)

4 years agoFix: Bucket resource leak when cleanup
Pei [Tue, 5 May 2020 08:07:27 +0000 (01:07 -0700)]
Fix: Bucket resource leak when cleanup

In the function of nuke_prefixed_buckets, if some err is thrown when deleting buckets, the left buckets remain uncleaned.
It is kind of resoruce leak on some charged platform. We have to clear them manually.

I know the original code is meant to give the user some hint by rasing error. But the resource leak of left buckets is a little annoying.

This PR would skip the problem point and continue the teardown process. The last client error would be saved and re-raised after the loop completes.

Signed-off-by: Pei <huangp0600@126.com>
Signed-off-by: Pei <phuang1@dev-new-3-3854897.slc07.dev.ebayc3.com>
(cherry picked from commit 713012c178b074539cd80e10a26c115194c8571f)

4 years agodisable ssl verify by default
Ali Maredia [Tue, 10 Aug 2021 18:41:05 +0000 (14:41 -0400)]
disable ssl verify by default

Signed-off-by: Ali Maredia <amaredia@redhat.com>
(cherry picked from commit b252638369f56ab171bc88d54d71025ce8b8d6c7)

4 years agoAdd support for disabling SSL certificate verification
Pragadeeswaran Sathyanarayanan [Fri, 30 Jul 2021 04:14:29 +0000 (09:44 +0530)]
Add support for disabling SSL certificate verification

Signed-off-by: Pragadeeswaran Sathyanarayanan <psathyan@redhat.com>
(cherry picked from commit ea3caaa76bf80094596753cc8abab776f9c50253)

4 years agoAdd tests for issue 47586.
Mark Houghton [Mon, 19 Oct 2020 16:58:56 +0000 (17:58 +0100)]
Add tests for issue 47586.

(cherry picked from commit 7fe0304e9c373b993465dc5ac4058821c3b03577)

4 years agoAdd test to check retain date is in iso 8601 format
Danny Abukalam [Wed, 14 Jul 2021 22:03:35 +0000 (18:03 -0400)]
Add test to check retain date is in iso 8601 format

Signed-off-by: Danny Abukalam <danny@softiron.com>
(cherry picked from commit e229d1aaf6eef5133643454a9643276fe34bd4f7)

4 years agosts: test role policy around nonexistent objects
Casey Bodley [Wed, 7 Apr 2021 15:33:46 +0000 (11:33 -0400)]
sts: test role policy around nonexistent objects

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7276bee050a971b11ccf6f298436bc893620b190)

4 years agotest that listed buckets have creation time
Casey Bodley [Thu, 11 Mar 2021 21:36:24 +0000 (16:36 -0500)]
test that listed buckets have creation time

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 66ced9af1d1f27cb06754607f8df072e7618d57d)