]> git.apps.os.sepia.ceph.com Git - s3-tests.git/log
s3-tests.git
5 months agorgw/s3tests: making the tests generic to check only ceph-squid-19.2.2
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)

5 months agoMerge pull request #630 from ceph/wip-squidfix-test
Adam Emerson [Wed, 19 Mar 2025 00:23:49 +0000 (20:23 -0400)]
Merge pull request #630 from ceph/wip-squidfix-test

Revert "squid is missing exception handling, it cause s3-tests to fail"

5 months agoRevert "squid is missing exception handling, it cause s3-tests to fail" wip-squidfix-test 630/head
Adam C. Emerson [Tue, 18 Mar 2025 16:07:53 +0000 (12:07 -0400)]
Revert "squid is missing exception handling, it cause s3-tests to fail"

This reverts commit 367075d28e52cd91167332b4c66f7299d8dd52d6.

This is a test to see if it is responsible for the failures in squid.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
6 months agoMerge pull request #615 from galsalomon66/streamerror_exception_handling wip-unrevert-test
Gal Salomon [Wed, 19 Feb 2025 18:37:14 +0000 (20:37 +0200)]
Merge pull request #615 from galsalomon66/streamerror_exception_handling

squid is missing exception handling, it cause s3-tests to fail

7 months agosquid is missing exception handling, it cause s3-tests to fail 615/head
Gal Salomon [Mon, 3 Feb 2025 12:23:16 +0000 (14:23 +0200)]
squid is missing exception handling, it cause s3-tests to fail

12 months agofix comments
galsalomon66 [Wed, 28 Aug 2024 09:48:09 +0000 (09:48 +0000)]
fix comments

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

12 months agofix the assert per empty results
Gal Salomon [Mon, 19 Aug 2024 13:00:16 +0000 (16:00 +0300)]
fix the assert per empty results

Signed-off-by: Gal Salomon <gal.salomon@gmail.com>
(cherry picked from commit 9444c2967439354cb52b17c3e6fbe06d3b40505f)
(cherry picked from commit 0802a6f1f86e6025c1ad9647a94b2e55907ef00c)

12 months agoMerge pull request #513 from galsalomon66/using_get_bucket_name
Ali Maredia [Wed, 21 Jun 2023 19:32:59 +0000 (15:32 -0400)]
Merge pull request #513 from galsalomon66/using_get_bucket_name

Using get bucket name

(cherry picked from commit 28009bf7d3d2081612610e4bc4275af067c637cc)
(cherry picked from commit d776898f61d4ac950b8552d0f7a859e951de5d4a)

14 months agotest Get/HeadObject with partNumber for single-multipart upload
Casey Bodley [Wed, 26 Jun 2024 14:50:28 +0000 (10:50 -0400)]
test Get/HeadObject with partNumber for single-multipart upload

test_multipart_get_part() tests 'normal' multipart uploads. add a new
test case for a multipart upload with a single part to tests the fix
for https://tracker.ceph.com/issues/66705

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

14 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)

16 months agosns: add test_sns.py for simple topic testing
Casey Bodley [Wed, 13 Mar 2024 00:05:15 +0000 (20:05 -0400)]
sns: add test_sns.py for simple topic testing

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

16 months agoiam: move iam_root, iam_alt_root fixtures to iam.py
Casey Bodley [Tue, 12 Mar 2024 19:47:51 +0000 (15:47 -0400)]
iam: move iam_root, iam_alt_root fixtures to iam.py

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

16 months agos3: remove test_bucket_acl_no_grants()
Casey Bodley [Fri, 1 Mar 2024 14:59:09 +0000 (09:59 -0500)]
s3: remove test_bucket_acl_no_grants()

aws doesn't consult acls for same-account access. rgw doesn't for
account users either

Fixes: https://github.com/ceph/s3-tests/issues/184
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 96d658444ac1b70a28acb5d0e88460f89d71aa0a)

16 months agoiam: test cross-account policy with assumed role
Casey Bodley [Wed, 21 Feb 2024 14:36:06 +0000 (09:36 -0500)]
iam: test cross-account policy with assumed role

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

16 months agoiam: add account tests for GroupPolicy apis
Casey Bodley [Sun, 11 Feb 2024 16:51:17 +0000 (11:51 -0500)]
iam: add account tests for GroupPolicy apis

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

16 months agoiam: add account tests for Group apis
Casey Bodley [Sun, 11 Feb 2024 16:50:43 +0000 (11:50 -0500)]
iam: add account tests for Group apis

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

16 months agoiam: add account test for OpenIDConnectProvider apis
Casey Bodley [Tue, 6 Feb 2024 22:57:14 +0000 (17:57 -0500)]
iam: add account test for OpenIDConnectProvider apis

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

16 months agoiam: test cross-account permissions
Casey Bodley [Tue, 30 Jan 2024 23:17:17 +0000 (18:17 -0500)]
iam: test cross-account permissions

test the [iam alt root] user's access to buckets owned by [iam root]
using various policy principals and acl grantees

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

16 months agoconfig: add [iam alt root] for an alt account's root user
Casey Bodley [Tue, 30 Jan 2024 23:16:40 +0000 (18:16 -0500)]
config: add [iam alt root] for an alt account's root user

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

16 months agoiam: test managed role policy
Casey Bodley [Sun, 4 Feb 2024 23:07:09 +0000 (18:07 -0500)]
iam: test managed role policy

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

16 months agoiam: add account test for RolePolicy apis
Casey Bodley [Fri, 26 Jan 2024 20:51:55 +0000 (15:51 -0500)]
iam: add account test for RolePolicy apis

adds test cases for the following iam actions:
* PutRolePolicy
* GetRolePolicy
* DeleteRolePolicy
* ListRolePolicies

verified to pass against aws when an account root user's credentials are
provided in the [iam] section of s3tests.conf

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

16 months agoiam: add account tests for Role apis
Casey Bodley [Fri, 26 Jan 2024 20:23:40 +0000 (15:23 -0500)]
iam: add account tests for Role apis

adds test cases for the following iam actions:
* CreateRole
* GetRole
* ListRoles
* DeleteRole
* UpdateRole

verified to pass against aws when an account root user's credentials are
provided in the [iam] section of s3tests.conf

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

16 months agoiam: test managed user policy
Casey Bodley [Sun, 4 Feb 2024 23:06:39 +0000 (18:06 -0500)]
iam: test managed user policy

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

16 months agoiam: add account tests for UserPolicy apis
Casey Bodley [Fri, 12 Jan 2024 03:49:54 +0000 (22:49 -0500)]
iam: add account tests for UserPolicy apis

adds test cases for the following iam actions:
* PutUserPolicy
* GetUserPolicy
* DeleteUserPolicy
* ListUserPolicies

verified to pass against aws when an account root user's credentials are
provided in the [iam] section of s3tests.conf

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

16 months agoiam: test bucket policy principal for iam user with path
Casey Bodley [Tue, 2 Jan 2024 00:11:24 +0000 (19:11 -0500)]
iam: test bucket policy principal for iam user with path

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

16 months agoiam: add tests for AccessKey apis
Casey Bodley [Wed, 20 Dec 2023 19:17:35 +0000 (14:17 -0500)]
iam: add tests for AccessKey apis

adds test cases for the following iam actions:
* CreateAccessKey
* UpdateAccessKey
* DeleteAccessKey
* ListAccessKeys

verified to pass against aws when an account root user's credentials are
provided in the [iam] section of s3tests.conf

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

16 months agoiam: add tests for User apis
Casey Bodley [Tue, 19 Dec 2023 15:26:19 +0000 (10:26 -0500)]
iam: add tests for User apis

adds test cases for the following iam actions:
* CreateUser
* GetUser
* UpdateUser
* DeleteUser
* ListUsers

verified to pass against aws when an account root user's credentials are
provided in the [iam] section of s3tests.conf

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

16 months agoconfig: add [iam root] for an account root user
Casey Bodley [Sun, 4 Feb 2024 23:25:31 +0000 (18:25 -0500)]
config: add [iam root] for an account root user

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

16 months agoconfig: parse iam config during setup()
Casey Bodley [Tue, 2 Jan 2024 00:08:10 +0000 (19:08 -0500)]
config: parse iam config during setup()

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

16 months agoiam: rename test_of_iam mark to iam_tenant
Casey Bodley [Fri, 12 Jan 2024 03:45:03 +0000 (22:45 -0500)]
iam: rename test_of_iam mark to iam_tenant

differentiate the test cases that expect a tenant-wide IAM api from new
ones that expect an account-wide api

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

16 months agoconfig: add fixtures for iam name/path prefixes
Casey Bodley [Fri, 12 Jan 2024 03:42:24 +0000 (22:42 -0500)]
config: add fixtures for iam name/path prefixes

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

17 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)

18 months agoadd tests for ObjectSizeGreater(Less)Than
Matt Benjamin [Fri, 8 Mar 2024 15:10:47 +0000 (10:10 -0500)]
add tests for ObjectSizeGreater(Less)Than

Add tests for the new ObjectSizeGreaterThan and
ObjectSizeLessThan lifecycle operators.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit f752d6b6d88dd607710a876d1f195b0d23abd7ef)

18 months agoadd test test_lifecycle_expiration_newer_noncurrent()
Matt Benjamin [Thu, 7 Mar 2024 19:27:13 +0000 (14:27 -0500)]
add test test_lifecycle_expiration_newer_noncurrent()

This verifies the new NewerNoncurrentVersions lifecycle filter
operator.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit a5aa59df04b4fe446962c7394a53084c10212b84)

18 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)

18 months agos3: object lock tests for deletion of multipart objects
Casey Bodley [Fri, 9 Feb 2024 19:22:37 +0000 (14:22 -0500)]
s3: object lock tests for deletion of multipart objects

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

18 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)

18 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)

18 months agoAdd more testing for presigned URLs
Tobias Urdin [Sun, 4 Feb 2024 14:28:28 +0000 (14:28 +0000)]
Add more testing for presigned URLs

This improves the testing for presigned URLs for
both get_object and put_object when using
generate_presigned_url().

It covers the case where you pass for example
a x-amz-acl (ACL in params for generated_presigned_url)
header that should be signed.

Tests the regression in [1].

[1] https://tracker.ceph.com/issues/64308

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

18 months agotag test_versioning_obj_suspended_copy with fails_on_dbstore
Jane Zhu [Mon, 12 Feb 2024 17:44:49 +0000 (12:44 -0500)]
tag test_versioning_obj_suspended_copy with fails_on_dbstore

Signed-off-by: Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com>
(cherry picked from commit 1866f04d81cbd012ad91480e9f207c9222dfffb7)

18 months agoadd test case for object copy in versioning suspended bucket
Jane Zhu [Fri, 9 Feb 2024 04:01:12 +0000 (23:01 -0500)]
add test case for object copy in versioning suspended bucket

Signed-off-by: Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com>
(cherry picked from commit a2acdbfdda7f633d1f566557748d30f742549a6c)

18 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)

20 months ago304 Not Modified tests still expect etag header
Casey Bodley [Tue, 21 Nov 2023 03:47:28 +0000 (22:47 -0500)]
304 Not Modified tests still expect etag header

test case for https://tracker.ceph.com/issues/45736

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

21 months agoobject lock: test very large RetainUntilDate
Casey Bodley [Wed, 15 Nov 2023 21:31:52 +0000 (16:31 -0500)]
object lock: test very large RetainUntilDate

https://tracker.ceph.com/issues/63537 reported that large dates (with
year after 2107) got truncated when written. test with a later date, and
check that get_object_retention() gives back the date we put

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

21 months agotest Head/GetObject on completed multipart parts
Casey Bodley [Fri, 17 Feb 2023 15:03:59 +0000 (10:03 -0500)]
test Head/GetObject on completed multipart parts

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

23 months agoadd test_post_object_wrong_bucket()
Casey Bodley [Wed, 27 Sep 2023 18:31:43 +0000 (14:31 -0400)]
add test_post_object_wrong_bucket()

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

23 months agoboto2: copy configured_storage_classes() fix from boto3
Casey Bodley [Thu, 21 Sep 2023 21:42:58 +0000 (17:42 -0400)]
boto2: copy configured_storage_classes() fix from boto3

some boto2 storage class tests are failing because the list returned by
configured_storage_classes() included an empty string

the boto3 version had an extra line that removes empty values; copy that
for boto2

Signed-off-by: Casey Bodley <cbodley@redhat.com>
23 months agoboto2: fix byte vs. string comparison in verify_object
Casey Bodley [Thu, 21 Sep 2023 14:00:37 +0000 (10:00 -0400)]
boto2: fix byte vs. string comparison in verify_object

the storage class tests were failing on comparisons between the input
data and output data:

AssertionError: assert 'oFbdZvtRj' == b'oFbdZvtRj'

convert the byte representation back to string for comparison

Signed-off-by: Casey Bodley <cbodley@redhat.com>
23 months agolc: test transition of plain null version
Casey Bodley [Fri, 4 Aug 2023 13:54:50 +0000 (09:54 -0400)]
lc: test transition of plain null version

for validating the fix of https://tracker.ceph.com/issues/62013

Signed-off-by: Casey Bodley <cbodley@redhat.com>
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 agoAdd testcase to verify obj mtime post setattrs
Soumya Koduri [Wed, 28 Jun 2023 07:42:54 +0000 (13:12 +0530)]
Add testcase to verify obj mtime post setattrs

Object mtime should not change for any attr changes unless
its a copy operation. Verify the same using PutObjectACL op.

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

2 years agoremove reliance on x-rgw-object-count and x-rgw-bytes-used headers
Casey Bodley [Wed, 21 Jun 2023 17:20:53 +0000 (13:20 -0400)]
remove reliance on x-rgw-object-count and x-rgw-bytes-used headers

stop using head_bucket() to fetch these response headers, and use
list_objects_v2() instead to count objects and sizes

Fixes: #315
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 188b392131c9292386cee7c929aaa4ab17f655a5)

2 years agoboto3/test_s3: add ranges around part boundary for encryption tests
Abhishek Lekshmanan [Tue, 26 Mar 2019 10:24:06 +0000 (11:24 +0100)]
boto3/test_s3: add ranges around part boundary for encryption tests

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 00cdcaf056011c492ec52a60b86906f387812ea3)

2 years agoboto3/test_s3: range encoding helper function takes a size argument
Abhishek Lekshmanan [Tue, 26 Mar 2019 10:22:00 +0000 (11:22 +0100)]
boto3/test_s3: range encoding helper function takes a size argument

This is to avoid a get_object call for every range check as the object size will
not change during this duration and we'd most likely already know the object
sizes beforehand

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 741f2cbc9e054bcf94718391c305d7d4b07de59d)

2 years agosse: add sse-c test with unaligned multipart parts
Casey Bodley [Fri, 22 Mar 2019 15:41:44 +0000 (11:41 -0400)]
sse: add sse-c test with unaligned multipart parts

Fixes: http://tracker.ceph.com/issues/38700
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b05a394738a9aed826badc0dd8a47265a3c887e4)

2 years agoAdd test_versioning_concurrent_multi_object_delete
Cory Snyder [Thu, 21 Jul 2022 18:33:51 +0000 (18:33 +0000)]
Add test_versioning_concurrent_multi_object_delete

Tests that concurrent multi-object delete requests which specify
the same versioned object instances return successful object
responses within response body.

relates to: https://tracker.ceph.com/issues/56646

Signed-off-by: Cory Snyder <csnyder@iland.com>
(cherry picked from commit e18ea7fac449a420093bbdcfb016197db9f3de0e)

2 years agoadding tests per JSON input types, which includes various SQL operators. 511/head
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>
2 years agotest_sse_s3_default_multipart_upload verifies encryption header
Casey Bodley [Thu, 30 Mar 2023 18:27:27 +0000 (14:27 -0400)]
test_sse_s3_default_multipart_upload verifies encryption header

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

2 years agotest object PUT with chunked transfer enconding
Mark Kogan [Tue, 7 Mar 2023 14:08:51 +0000 (14:08 +0000)]
test object PUT with chunked transfer enconding

Before the RGW fix PR was responding with 411 instead of 200

RGW fix PR: https://github.com/ceph/ceph/pull/50235

Signed-off-by: Mark Kogan <mkogan@redhat.com>
(cherry picked from commit 13a9bfc00aab2bec910f5ac6b5f63fa24e5f48dd)

2 years agoboto3: multi-object-delete tests use client.delete_objects()
Casey Bodley [Mon, 13 Mar 2023 17:00:25 +0000 (13:00 -0400)]
boto3: multi-object-delete tests use client.delete_objects()

when the tests were converted from boto2, they were rewritten as loops
over client.delete_object(). switch back to multi-delete

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

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 agoadd test_get_object_torrent
Casey Bodley [Sun, 19 Feb 2023 17:32:47 +0000 (12:32 -0500)]
add test_get_object_torrent

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

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)

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)

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)

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)

2 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>
2 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)

2 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)

2 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)

2 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)