Files
Nick Craig-Wood df5b121b6e serve s3: update the s3-tests expected to pass
This updates expected-pass.txt for the fixes to gofakes3 and serve
s3, which make 125 more of the s3-tests pass, 297 in all.

36 tests no longer pass, as they only passed because requests were
silently ignored or mishandled:

- 19 used SSE-C or SSE-KMS, now refused as they aren't supported
- 12 browser POST uploads expected 400, but unauthenticated requests
  now get 403 as on AWS
- 5 set an ACL other than private, or object lock, now refused

The s3-tests config now gives the owner gofakes3 uses for the main
user, so the ACLs returned match it, and no api_name, as bucket
locations aren't stored.
2026-10-29 11:01:27 +00:00
..

s3-tests for rclone serve s3

This runs the ceph/s3-tests S3 compatibility suite against rclone serve s3.

It needs git, go and python3 (with the venv module). Run it with

cmd/serve/s3/s3tests/run.sh

This fetches s3-tests at a pinned commit, makes a Python venv with the pinned requirements.txt (both cached in ~/.cache/rclone-s3tests), builds rclone from this tree and serves a temporary local directory with the three users s3-tests needs. A full run takes about 10 minutes.

To run a subset, pass test ids or pytest options

cmd/serve/s3/s3tests/run.sh s3tests/functional/test_s3.py::test_bucket_list_empty
cmd/serve/s3/s3tests/run.sh -k multipart

To test a different remote or flags

RCLONE_REMOTE=:memory: cmd/serve/s3/s3tests/run.sh
RCLONE_ARGS="--vfs-cache-mode full" cmd/serve/s3/s3tests/run.sh

See the top of run.sh for the other environment variables.

Results

Results go to a temporary directory (or $S3TESTS_OUT) which has

  • pytest.log - the full pytest output, with tracebacks
  • junit.xml - machine readable results
  • rclone.log - the log from rclone serve s3
  • report.txt - the summary printed at the end

The summary shows pass/fail/skip counts by feature area and the commonest failures.

Many tests fail because they test features serve s3 doesn't implement (ACLs, versioning, lifecycle, bucket policies, encryption, object lock, etc), so rather than tracking the failures, expected-pass.txt lists the tests which should pass. The run fails if any of them don't, and lists any other tests which now pass. After fixing something, add the newly passing tests with

cmd/serve/s3/s3tests/run.sh --update

and commit the change to expected-pass.txt with the fix.

Files

  • run.sh - the test runner
  • report.py - summarises the results and checks them against expected-pass.txt
  • rclone_shim.py - pytest plugin adapting the s3-tests cleanup to serve s3 (it doesn't change what the tests test)
  • s3tests.conf.in - the s3-tests config
  • requirements.txt - pinned Python dependencies
  • expected-pass.txt - the tests which should pass

The s3-tests suite has moved into the ceph repository (src/test/rgw/s3-tests in ceph/ceph). run.sh uses the final commit of the standalone repository.