]> git.apps.os.sepia.ceph.com Git - s3-tests.git/log
s3-tests.git
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)

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)