snapshot of https://github.com/seaweedfs/seaweedfs.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
go: build dev binaries / cleanup (push) Successful in 4s
Codespell / Check for spelling errors (push) Failing after 3s
docker: build dev containers / build-rust-binaries (amd64, x86_64-unknown-linux-musl) (push) Failing after 3s
docker: build dev containers / build-dev-containers (push) Has been skipped
docker: build dev containers / build-rust-binaries (arm64, true, aarch64-unknown-linux-musl) (push) Failing after 3s
End to End / FUSE Mount (push) Failing after 2s
EC Integration Tests / EC Integration Tests (push) Failing after 30s
FUSE DLM Integration Tests / FUSE DLM Integration Tests (push) Failing after 3s
FUSE Volume Server Failover Tests / FUSE Volume Server Failover (push) Failing after 3s
FUSE Integration Tests / FUSE Integration Testing (push) Failing after 2s
FUSE P2P Peer Chunk Sharing Integration Tests / FUSE P2P Peer Chunk Sharing (push) Failing after 3s
go: build binary / Go Vet (push) Failing after 2s
go: build binary / Go Vet 32-bit (push) Failing after 3s
go: build binary / Build (push) Failing after 4s
go: build binary / Build cross-platform (freebsd/amd64) (push) Failing after 3s
go: build binary / Build cross-platform (windows/amd64) (push) Failing after 3s
go: build binary / Build cross-platform (darwin/arm64) (push) Failing after 3s
go: build binary / Build cross-platform (windows/arm64) (push) Failing after 3s
go: build binary / Test (push) Failing after 2s
go: build binary / Test 32-bit (push) Failing after 3s
helm: lint and test charts / lint-test (push) Failing after 3s
Java Client Integration Tests / Java Integration Tests (11) (push) Failing after 3s
Java Client Integration Tests / Java Integration Tests (17) (push) Failing after 3s
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Failing after 2s
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Failing after 3s
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Has been skipped
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Has been skipped
Java Client Unit Tests / Java Unit Tests (11) (push) Failing after 3s
Java Client Unit Tests / Java Unit Tests (17) (push) Failing after 2s
Java Client Unit Tests / Java Unit Tests (21) (push) Failing after 3s
Java Client Unit Tests / Java Unit Tests (8) (push) Failing after 3s
Kafka Quick Test (Load Test with Schema Registry) / Kafka Client Load Test (Quick) (push) Failing after 3s
Kafka Gateway Tests / Kafka Unit Tests (unit-tests-1) (push) Failing after 11s
Kafka Gateway Tests / Kafka Integration Tests (Critical) (integration-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka End-to-End Tests (with SMQ) (e2e-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka Consumer Group Tests (Highly Isolated) (consumer-group-1) (push) Failing after 2s
Kafka Gateway Tests / Kafka Client Compatibility (with SMQ) (client-compat-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka SMQ Integration Tests (Full Stack) (smq-integration-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka Protocol Tests (Isolated) (protocol-1) (push) Failing after 3s
KMS Tests / KMS Provider Integration Tests (push) Failing after 2s
KMS Tests / S3 KMS End-to-End Tests (push) Failing after 3s
Master Cold Start Tests / Master Cold Start Tests (push) Failing after 4s
Metadata Subscribe Integration Tests / Metadata Subscribe Integration Tests (push) Failing after 3s
Multi-Master Tests / Multi-Master Failover Tests (push) Failing after 3s
Performance / CPU and Heap Profile (push) Failing after 2s
Performance / S3 Read/Write Benchmark (rust volume) (push) Failing after 3s
pjdfstest POSIX Compliance / pjdfstest (push) Failing after 2s
Plugin Worker Integration Tests / Plugin Worker: erasure_coding (push) Failing after 3s
Plugin Worker Integration Tests / Plugin Worker: vacuum (push) Failing after 3s
Rust Volume Server Tests / Rust Integration Tests (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 1) (push) Failing after 2s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 1) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 2) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 2) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 3) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Distributed Tests (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Performance Tests (push) Failing after 3s
Performance / Throughput Benchmark (go volume) (push) Failing after 3s
Performance / Throughput Benchmark (rust volume) (push) Failing after 2s
Performance / S3 Read/Write Benchmark (go volume) (push) Failing after 3s
Plugin Worker Integration Tests / Plugin Worker: volume_balance (push) Failing after 3s
PostgreSQL Gateway Tests / PostgreSQL Basic Tests (push) Failing after 3s
Rust Volume Server Tests / Rust Unit Tests (push) Failing after 2s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 3) (push) Failing after 3s
Rust Plugin Worker Tests / Rust Plugin Worker Build and Unit Tests (push) Failing after 3s
rust: build dev volume server binaries / cleanup (push) Successful in 3s
S3 ETag and ACL Tests / S3 ETag + ACL Integration Tests (push) Failing after 3s
S3 IAM Integration Tests / IAM Unit Tests (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (advanced) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (basic) (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Integration Tests (group) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (policy-enforcement) (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Integration Tests (sts) (push) Failing after 4s
S3 Keycloak Integration Tests / S3 Keycloak Integration Tests (push) Failing after 3s
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.11) (push) Failing after 3s
S3 PyArrow Parquet Tests / Go Unit Tests (Implicit Directory) (push) Has been cancelled
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.12) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-darwin (darwin-amd64, x86_64-apple-darwin) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-darwin (darwin-arm64, aarch64-apple-darwin) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-linux (linux-amd64, x86_64-unknown-linux-gnu) (push) Has been cancelled
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.9) (push) Has been cancelled
S3 Proxy Signature Tests / S3 Proxy Signature Verification Tests (push) Has been cancelled
S3 SDK V2 Route Disambiguation Tests / S3 SDK V2 Routing Tests (push) Has been cancelled
S3 SSE Tests / S3 SSE Integration Tests (quick) (push) Has been cancelled
S3 SSE Tests / S3 SSE Compatibility Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Metadata Persistence Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Copy Operations Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Multipart Upload Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Performance Test (push) Has been cancelled
S3 SSE Tests / S3 Volume Encryption Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Integration Tests (comprehensive) (push) Has been cancelled
Spark Integration Tests / Spark Integration Tests (push) Failing after 2s
Telemetry Integration Tests / telemetry-integration-test (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 1) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 1) (push) Failing after 3s
Ceph S3 tests / Basic S3 tests (KV store) (push) Has been cancelled
Ceph S3 tests / S3 Versioning & Object Lock tests (push) Has been cancelled
S3 Policy Integration Tests / S3 Policy Unit Tests (push) Failing after 3s
Ceph S3 tests / S3 CORS tests (push) Has been cancelled
Ceph S3 tests / SeaweedFS Custom S3 Copy tests (push) Has been cancelled
Ceph S3 tests / Basic S3 tests (SQL store) (push) Has been cancelled
test s3 over https using aws-cli / awscli-tests (push) Has been cancelled
TLS Rotation Integration Tests / TLS Rotation Integration Tests (push) Has been cancelled
Vacuum Integration Tests / Vacuum Integration Tests (push) Has been cancelled
S3 Policy Integration Tests / S3 Policy Variables Integration Tests (push) Failing after 3s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (advanced-policy) (push) Failing after 3s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (basic-policy) (push) Failing after 2s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (contextual-policy) (push) Failing after 4s
S3 Policy Integration Tests / Trusted Proxy Detection Tests (push) Failing after 2s
S3 Policy Integration Tests / S3 Policy Shell Integration Tests (push) Failing after 3s
Samba on FUSE Integration / samba-integration (push) Failing after 2s
SFTP Integration Tests / SFTP Integration Testing (push) Failing after 3s
terraform: validate and test modules / fmt, validate, plan-level tests (push) Failing after 3s
terraform: validate and test modules / local cluster smoke test (real weed) (push) Failing after 2s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 3) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 2) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 2) (push) Failing after 2s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 3) (push) Failing after 5s
mount: windows conformance / WinFsp conformance (push) Has been cancelled
mount: windows / Mount on Windows (push) Has been cancelled
Some checks failed
go: build dev binaries / cleanup (push) Successful in 4s
Codespell / Check for spelling errors (push) Failing after 3s
docker: build dev containers / build-rust-binaries (amd64, x86_64-unknown-linux-musl) (push) Failing after 3s
docker: build dev containers / build-dev-containers (push) Has been skipped
docker: build dev containers / build-rust-binaries (arm64, true, aarch64-unknown-linux-musl) (push) Failing after 3s
End to End / FUSE Mount (push) Failing after 2s
EC Integration Tests / EC Integration Tests (push) Failing after 30s
FUSE DLM Integration Tests / FUSE DLM Integration Tests (push) Failing after 3s
FUSE Volume Server Failover Tests / FUSE Volume Server Failover (push) Failing after 3s
FUSE Integration Tests / FUSE Integration Testing (push) Failing after 2s
FUSE P2P Peer Chunk Sharing Integration Tests / FUSE P2P Peer Chunk Sharing (push) Failing after 3s
go: build binary / Go Vet (push) Failing after 2s
go: build binary / Go Vet 32-bit (push) Failing after 3s
go: build binary / Build (push) Failing after 4s
go: build binary / Build cross-platform (freebsd/amd64) (push) Failing after 3s
go: build binary / Build cross-platform (windows/amd64) (push) Failing after 3s
go: build binary / Build cross-platform (darwin/arm64) (push) Failing after 3s
go: build binary / Build cross-platform (windows/arm64) (push) Failing after 3s
go: build binary / Test (push) Failing after 2s
go: build binary / Test 32-bit (push) Failing after 3s
helm: lint and test charts / lint-test (push) Failing after 3s
Java Client Integration Tests / Java Integration Tests (11) (push) Failing after 3s
Java Client Integration Tests / Java Integration Tests (17) (push) Failing after 3s
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Failing after 2s
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Failing after 3s
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Has been skipped
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Has been skipped
Java Client Unit Tests / Java Unit Tests (11) (push) Failing after 3s
Java Client Unit Tests / Java Unit Tests (17) (push) Failing after 2s
Java Client Unit Tests / Java Unit Tests (21) (push) Failing after 3s
Java Client Unit Tests / Java Unit Tests (8) (push) Failing after 3s
Kafka Quick Test (Load Test with Schema Registry) / Kafka Client Load Test (Quick) (push) Failing after 3s
Kafka Gateway Tests / Kafka Unit Tests (unit-tests-1) (push) Failing after 11s
Kafka Gateway Tests / Kafka Integration Tests (Critical) (integration-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka End-to-End Tests (with SMQ) (e2e-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka Consumer Group Tests (Highly Isolated) (consumer-group-1) (push) Failing after 2s
Kafka Gateway Tests / Kafka Client Compatibility (with SMQ) (client-compat-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka SMQ Integration Tests (Full Stack) (smq-integration-1) (push) Failing after 3s
Kafka Gateway Tests / Kafka Protocol Tests (Isolated) (protocol-1) (push) Failing after 3s
KMS Tests / KMS Provider Integration Tests (push) Failing after 2s
KMS Tests / S3 KMS End-to-End Tests (push) Failing after 3s
Master Cold Start Tests / Master Cold Start Tests (push) Failing after 4s
Metadata Subscribe Integration Tests / Metadata Subscribe Integration Tests (push) Failing after 3s
Multi-Master Tests / Multi-Master Failover Tests (push) Failing after 3s
Performance / CPU and Heap Profile (push) Failing after 2s
Performance / S3 Read/Write Benchmark (rust volume) (push) Failing after 3s
pjdfstest POSIX Compliance / pjdfstest (push) Failing after 2s
Plugin Worker Integration Tests / Plugin Worker: erasure_coding (push) Failing after 3s
Plugin Worker Integration Tests / Plugin Worker: vacuum (push) Failing after 3s
Rust Volume Server Tests / Rust Integration Tests (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 1) (push) Failing after 2s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 1) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 2) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 2) (push) Failing after 3s
Rust Volume Server Tests / Go Tests with Rust Volume (grpc - Shard 3) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Distributed Tests (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Performance Tests (push) Failing after 3s
Performance / Throughput Benchmark (go volume) (push) Failing after 3s
Performance / Throughput Benchmark (rust volume) (push) Failing after 2s
Performance / S3 Read/Write Benchmark (go volume) (push) Failing after 3s
Plugin Worker Integration Tests / Plugin Worker: volume_balance (push) Failing after 3s
PostgreSQL Gateway Tests / PostgreSQL Basic Tests (push) Failing after 3s
Rust Volume Server Tests / Rust Unit Tests (push) Failing after 2s
Rust Volume Server Tests / Go Tests with Rust Volume (http - Shard 3) (push) Failing after 3s
Rust Plugin Worker Tests / Rust Plugin Worker Build and Unit Tests (push) Failing after 3s
rust: build dev volume server binaries / cleanup (push) Successful in 3s
S3 ETag and ACL Tests / S3 ETag + ACL Integration Tests (push) Failing after 3s
S3 IAM Integration Tests / IAM Unit Tests (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (advanced) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (basic) (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Integration Tests (group) (push) Failing after 3s
S3 IAM Integration Tests / S3 IAM Integration Tests (policy-enforcement) (push) Failing after 2s
S3 IAM Integration Tests / S3 IAM Integration Tests (sts) (push) Failing after 4s
S3 Keycloak Integration Tests / S3 Keycloak Integration Tests (push) Failing after 3s
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.11) (push) Failing after 3s
S3 PyArrow Parquet Tests / Go Unit Tests (Implicit Directory) (push) Has been cancelled
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.12) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-darwin (darwin-amd64, x86_64-apple-darwin) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-darwin (darwin-arm64, aarch64-apple-darwin) (push) Has been cancelled
rust: build dev volume server binaries / build-rust-volume-dev-linux (linux-amd64, x86_64-unknown-linux-gnu) (push) Has been cancelled
S3 PyArrow Parquet Tests / PyArrow Parquet Tests (Python 3.9) (push) Has been cancelled
S3 Proxy Signature Tests / S3 Proxy Signature Verification Tests (push) Has been cancelled
S3 SDK V2 Route Disambiguation Tests / S3 SDK V2 Routing Tests (push) Has been cancelled
S3 SSE Tests / S3 SSE Integration Tests (quick) (push) Has been cancelled
S3 SSE Tests / S3 SSE Compatibility Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Metadata Persistence Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Copy Operations Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Multipart Upload Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Performance Test (push) Has been cancelled
S3 SSE Tests / S3 Volume Encryption Test (push) Has been cancelled
S3 SSE Tests / S3 SSE Integration Tests (comprehensive) (push) Has been cancelled
Spark Integration Tests / Spark Integration Tests (push) Failing after 2s
Telemetry Integration Tests / telemetry-integration-test (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 1) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 1) (push) Failing after 3s
Ceph S3 tests / Basic S3 tests (KV store) (push) Has been cancelled
Ceph S3 tests / S3 Versioning & Object Lock tests (push) Has been cancelled
S3 Policy Integration Tests / S3 Policy Unit Tests (push) Failing after 3s
Ceph S3 tests / S3 CORS tests (push) Has been cancelled
Ceph S3 tests / SeaweedFS Custom S3 Copy tests (push) Has been cancelled
Ceph S3 tests / Basic S3 tests (SQL store) (push) Has been cancelled
test s3 over https using aws-cli / awscli-tests (push) Has been cancelled
TLS Rotation Integration Tests / TLS Rotation Integration Tests (push) Has been cancelled
Vacuum Integration Tests / Vacuum Integration Tests (push) Has been cancelled
S3 Policy Integration Tests / S3 Policy Variables Integration Tests (push) Failing after 3s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (advanced-policy) (push) Failing after 3s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (basic-policy) (push) Failing after 2s
S3 Policy Integration Tests / S3 Policy Enforcement Integration Tests (contextual-policy) (push) Failing after 4s
S3 Policy Integration Tests / Trusted Proxy Detection Tests (push) Failing after 2s
S3 Policy Integration Tests / S3 Policy Shell Integration Tests (push) Failing after 3s
Samba on FUSE Integration / samba-integration (push) Failing after 2s
SFTP Integration Tests / SFTP Integration Testing (push) Failing after 3s
terraform: validate and test modules / fmt, validate, plan-level tests (push) Failing after 3s
terraform: validate and test modules / local cluster smoke test (real weed) (push) Failing after 2s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 3) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (grpc - Shard 2) (push) Failing after 3s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 2) (push) Failing after 2s
Volume Server Integration Tests / Volume Server Integration Tests (http - Shard 3) (push) Failing after 5s
mount: windows conformance / WinFsp conformance (push) Has been cancelled
mount: windows / Mount on Windows (push) Has been cancelled
This commit is contained in:
8
test/s3/compatibility/.gitignore
vendored
Normal file
8
test/s3/compatibility/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Test run scratch data
|
||||
/s3-tests
|
||||
/tmp
|
||||
|
||||
# Test run outputs
|
||||
weed.log
|
||||
compat.raw.txt
|
||||
compat.summary.txt
|
||||
23
test/s3/compatibility/Dockerfile
Normal file
23
test/s3/compatibility/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# the tests only support python 3.6, not newer
|
||||
#FROM ubuntu:latest
|
||||
FROM python:3.6.15-slim-bullseye
|
||||
|
||||
# Installed required system deps
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y -qq git-core sudo tzdata ca-certificates libxml2-dev libxslt1-dev zlib1g-dev python3-lxml gcc python3-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install python deps
|
||||
RUN pip install virtualenv
|
||||
|
||||
# Clone Ceph S3 tests
|
||||
COPY fix_s3_tests_bucket_conflicts.py /tmp/fix_s3_tests_bucket_conflicts.py
|
||||
ENV S3_TESTS_PATH=s3-tests
|
||||
RUN git clone https://github.com/ceph/s3-tests.git \
|
||||
&& python3 /tmp/fix_s3_tests_bucket_conflicts.py
|
||||
|
||||
WORKDIR s3-tests
|
||||
|
||||
RUN pip install -r requirements.txt \
|
||||
&& pip install tox \
|
||||
&& pip install -e .
|
||||
9
test/s3/compatibility/Makefile
Normal file
9
test/s3/compatibility/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
.PHONY: all build-image test
|
||||
|
||||
all: build-image test
|
||||
|
||||
build-image:
|
||||
./prepare.sh
|
||||
|
||||
test:
|
||||
./run.sh
|
||||
245
test/s3/compatibility/README.md
Normal file
245
test/s3/compatibility/README.md
Normal file
@@ -0,0 +1,245 @@
|
||||
# Running S3 Compatibility tests against SeaweedFS
|
||||
|
||||
This is using [the tests from CephFS][s3-tests].
|
||||
|
||||
[s3-tests]: https://github.com/ceph/s3-tests
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- have [Docker][docker] installed
|
||||
- this has been executed on Mac. On Linux, the hostname in `s3tests.conf` needs to be adjusted.
|
||||
|
||||
[docker]: https://docs.docker.com
|
||||
|
||||
## Running tests
|
||||
|
||||
To build the docker image that is used for the tests:
|
||||
|
||||
```console
|
||||
./prepare.sh
|
||||
```
|
||||
|
||||
To execute all tests:
|
||||
|
||||
```console
|
||||
./run.sh
|
||||
```
|
||||
To see debug output including all commands run by the script:
|
||||
|
||||
```console
|
||||
DEBUG=y ./run.sh
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> If your output does *not* look like the content in [`results.summary.txt`](./results.summary.txt)
|
||||
> and it is full of HTTP level exceptions, there is likely an error contacting the `weed` server from
|
||||
> the container that is running the S3 compatibility tests.
|
||||
>
|
||||
> There are at least a couple ways to solve this:
|
||||
>
|
||||
> - Modify your `docker` setup to ensure `host.docker.internal` is connected to your host running `weed`
|
||||
> - Use `--net=host` and modify `host` in `s3tests.conf` to `localhost`
|
||||
>
|
||||
> The `--net=host` solution is potentially *unsafe*, as the container running [s3-tests][s3-tests] could
|
||||
> visit unexpected websites or use the host-passthrough internet access maliciously.
|
||||
>
|
||||
> If you are OK with the risk of allowing `--net=host`:
|
||||
>
|
||||
> - Set `host = localhost` in `s3tests.conf`
|
||||
> - Set `DOCKER_NET_HOST=y` when running `run.sh`
|
||||
|
||||
## Most recent results
|
||||
|
||||
See [`results.summary.txt`](./results.summary.txt) for the latest results of compatibility testing (with the caveat that `s3-tests` is pinned to [`ceph/s3-tests` @ 9a6a1e9f197fc9fb031b809d1e057635c2ff8d4e](https://github.com/ceph/s3-tests/commit/9a6a1e9f197fc9fb031b809d1e057635c2ff8d4e)).
|
||||
|
||||
The file is reproduced below for ease of access:
|
||||
|
||||
```
|
||||
/s3-tests/virtualenv/lib/python3.6/site-packages/boto3/compat.py:88: PythonDeprecationWarning: Boto3 will no longer support Python 3.6 starting May 30, 2022. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.7 or later. More information can be found here: https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/
|
||||
warnings.warn(warning, PythonDeprecationWarning)
|
||||
s3tests_boto3.functional.test_s3.test_bucket_list_return_data ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_write_to_nonexist_bucket ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_read_not_exist ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_requestid_matches_header_on_error ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multi_object_delete ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multi_objectv2_delete ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multi_object_delete_key_limit ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multi_objectv2_delete_key_limit ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_head_zero_bytes ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_check_etag ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_cache_control ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_expires ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_read_update_read_delete ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_metadata_replaced_on_put ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_file ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_anonymous_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_authenticated_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_authenticated_no_content_type ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_authenticated_request_bad_access_key ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_set_success_code ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_set_invalid_success_code ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_upload_larger_than_chunk ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_set_key_from_filename ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_ignored_header ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_case_insensitive_condition_fields ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_escaped_field_values ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_success_redirect_action ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_signature ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_access_key ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_date_format ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_no_key_specified ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_signature ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_policy_condition ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_user_specified_header ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_request_missing_policy_specified_field ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_condition_is_case_sensitive ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_expires_is_case_sensitive ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_expired_policy ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_request_field_value ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_expires_condition ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_conditions_list ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_upload_size_limit_exceeded ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_content_length_argument ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_content_length_argument ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_upload_size_below_minimum ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_empty_conditions ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmatch_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifnonematch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifnonematch_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmodifiedsince_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmodifiedsince_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifunmodifiedsince_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifunmodifiedsince_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_overwrite_existed_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_nonexisted_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_nonexisted_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_overwrite_existed_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_bucket_gone ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_delete_key_bucket_gone ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_object_gone ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_response_headers ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_bucket_acl ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_object_acl ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_bucket_gone ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_object_gone ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_not_expired ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_out_range_zero ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_out_max_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_out_positive_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_anon_put ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_anon_put_write_access ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_put_authenticated ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_put_authenticated_expired ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_canned_publicreadwrite ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_write ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_writeacp ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_read ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_readacp ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_header_acl_grants ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_object_private ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_objectv2_private ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_object_publicread ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_objectv2_publicread ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_object_publicreadwrite ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_objectv2_publicreadwrite ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicread_object_private ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicread_object_publicread ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicread_object_publicreadwrite ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicreadwrite_object_private ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicreadwrite_object_publicread ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicreadwrite_object_publicreadwrite ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_bucket_create_special_key_names ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_zero_size ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_same_bucket ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_verify_contenttype ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_to_itself ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_to_itself_with_metadata ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_diff_bucket ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_not_owned_bucket ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_not_owned_object_bucket ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_canned_acl ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_retaining_metadata ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_replacing_metadata ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_bucket_not_found ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_key_not_found ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_empty ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_small ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_small ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_invalid_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_improper_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_without_range ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_special_names ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_resend_part ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_size_too_small ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_contents ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_overwrite_existing_object ... ok
|
||||
s3tests_boto3.functional.test_s3.test_abort_multipart_upload ... ok
|
||||
s3tests_boto3.functional.test_s3.test_abort_multipart_upload_not_found ... ok
|
||||
s3tests_boto3.functional.test_s3.test_list_multipart_upload ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_missing_part ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_incorrect_etag ... ok
|
||||
s3tests_boto3.functional.test_s3.test_100_continue ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_atomic_read_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_read_4mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_read_8mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_4mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_8mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_write_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_write_4mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_write_8mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_conditional_write_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_conditional_write_1mb ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_bucket_gone ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_multipart_upload_write ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_resend_first_finishes_last ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_big_request_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_skip_leading_bytes_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_return_trailing_bytes_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_invalid_range ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_empty_object ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_obj_tagging ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_obj_head_tagging ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_max_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_excess_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_max_kvsize_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_excess_key_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_excess_val_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_modify_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_delete_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_tags_anonymous_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_tags_authenticated_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_obj_with_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_multi_delete_object_with_retention ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_changing_mode_from_governance_with_bypass ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_changing_mode_from_governance_without_bypass ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_changing_mode_from_compliance ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifmatch_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifnonematch_good ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifnonematch_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_read_unreadable ... FAIL
|
||||
ERROR
|
||||
|
||||
======================================================================
|
||||
ERROR: s3tests_boto3.functional.test_s3.test_bucket_list_return_data
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
|
||||
self.test(*self.arg)
|
||||
File "/s3-tests/s3tests_boto3/functional/test_s3.py", line 1669, in test_bucket_list_return_data
|
||||
'DisplayName': acl_response['Owner']['DisplayName'],
|
||||
KeyError: 'Owner'
|
||||
-------------------- >> begin captured logging << --------------------
|
||||
```
|
||||
290
test/s3/compatibility/fix_s3_tests_bucket_conflicts.py
Normal file
290
test/s3/compatibility/fix_s3_tests_bucket_conflicts.py
Normal file
@@ -0,0 +1,290 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Patch Ceph s3-tests helpers to avoid bucket name mismatches and make bucket
|
||||
creation idempotent when a fixed bucket name is provided.
|
||||
|
||||
Why:
|
||||
- Some tests call get_new_bucket() to get a name, then call
|
||||
get_new_bucket_resource(name=<that name>) which unconditionally calls
|
||||
CreateBucket again. If the bucket already exists, boto3 raises a
|
||||
ClientError. We want to treat that as idempotent and reuse the bucket.
|
||||
- We must NOT silently generate a different bucket name when a name is
|
||||
explicitly provided, otherwise subsequent test steps still reference the
|
||||
original string and read from the wrong (empty) bucket.
|
||||
|
||||
What this does:
|
||||
- get_new_bucket_resource(name=...):
|
||||
- Try to create the exact bucket name.
|
||||
- If error code is BucketAlreadyOwnedByYou OR BucketAlreadyExists, simply
|
||||
reuse and return the bucket object for that SAME name.
|
||||
- Only when name is None, generate a new unique name with retries.
|
||||
- get_new_bucket(client=None, name=None):
|
||||
- If name is None, generate unique names with retries until creation
|
||||
succeeds, and return the actual name string to the caller.
|
||||
|
||||
This keeps bucket names consistent across the test helper calls and prevents
|
||||
404s or KeyErrors later in the tests that depend on that bucket name.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def patch_s3_tests_init_file(file_path: str) -> bool:
|
||||
if not os.path.exists(file_path):
|
||||
print(f"Error: File {file_path} not found")
|
||||
return False
|
||||
|
||||
print(f"Patching {file_path}...")
|
||||
with open(file_path, "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
# If already patched, skip
|
||||
if "max_retries = 10" in content and "BucketAlreadyOwnedByYou" in content and "BucketAlreadyExists" in content:
|
||||
print("Already patched. Skipping.")
|
||||
return True
|
||||
|
||||
old_resource_func = '''def get_new_bucket_resource(name=None):
|
||||
"""
|
||||
Get a bucket that exists and is empty.
|
||||
|
||||
Always recreates a bucket from scratch. This is useful to also
|
||||
reset ACLs and such.
|
||||
"""
|
||||
s3 = boto3.resource('s3',
|
||||
aws_access_key_id=config.main_access_key,
|
||||
aws_secret_access_key=config.main_secret_key,
|
||||
endpoint_url=config.default_endpoint,
|
||||
use_ssl=config.default_is_secure,
|
||||
verify=config.default_ssl_verify)
|
||||
if name is None:
|
||||
name = get_new_bucket_name()
|
||||
bucket = s3.Bucket(name)
|
||||
bucket_location = bucket.create()
|
||||
return bucket'''
|
||||
|
||||
new_resource_func = '''def get_new_bucket_resource(name=None):
|
||||
"""
|
||||
Get a bucket that exists and is empty.
|
||||
|
||||
Always recreates a bucket from scratch. This is useful to also
|
||||
reset ACLs and such.
|
||||
"""
|
||||
s3 = boto3.resource('s3',
|
||||
aws_access_key_id=config.main_access_key,
|
||||
aws_secret_access_key=config.main_secret_key,
|
||||
endpoint_url=config.default_endpoint,
|
||||
use_ssl=config.default_is_secure,
|
||||
verify=config.default_ssl_verify)
|
||||
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
# If a name is provided, do not change it. Reuse that exact bucket name.
|
||||
if name is not None:
|
||||
bucket = s3.Bucket(name)
|
||||
try:
|
||||
bucket.create()
|
||||
except ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyOwnedByYou', 'BucketAlreadyExists'):
|
||||
# Treat as idempotent create for an explicitly provided name.
|
||||
# We must not change the name or tests will read from the wrong bucket.
|
||||
return bucket
|
||||
# Other errors should surface
|
||||
raise
|
||||
else:
|
||||
return bucket
|
||||
|
||||
# Only generate unique names when no name was provided
|
||||
max_retries = 10
|
||||
for attempt in range(max_retries):
|
||||
gen_name = get_new_bucket_name()
|
||||
bucket = s3.Bucket(gen_name)
|
||||
try:
|
||||
bucket.create()
|
||||
return bucket
|
||||
except ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyExists', 'BucketAlreadyOwnedByYou'):
|
||||
if attempt == max_retries - 1:
|
||||
raise Exception(f"Failed to create unique bucket after {max_retries} attempts")
|
||||
continue
|
||||
else:
|
||||
raise'''
|
||||
|
||||
old_client_func = '''def get_new_bucket(client=None, name=None):
|
||||
"""
|
||||
Get a bucket that exists and is empty.
|
||||
|
||||
Always recreates a bucket from scratch. This is useful to also
|
||||
reset ACLs and such.
|
||||
"""
|
||||
if client is None:
|
||||
client = get_client()
|
||||
if name is None:
|
||||
name = get_new_bucket_name()
|
||||
|
||||
client.create_bucket(Bucket=name)
|
||||
return name'''
|
||||
|
||||
new_client_func = '''def get_new_bucket(client=None, name=None):
|
||||
"""
|
||||
Get a bucket that exists and is empty.
|
||||
|
||||
Always recreates a bucket from scratch. This is useful to also
|
||||
reset ACLs and such.
|
||||
"""
|
||||
if client is None:
|
||||
client = get_client()
|
||||
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
# If a name is provided, just try to create it once and fall back to idempotent reuse
|
||||
if name is not None:
|
||||
try:
|
||||
client.create_bucket(Bucket=name)
|
||||
except ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyOwnedByYou', 'BucketAlreadyExists'):
|
||||
return name
|
||||
raise
|
||||
else:
|
||||
return name
|
||||
|
||||
# Otherwise, generate a unique name with retries and return the actual name string
|
||||
max_retries = 10
|
||||
for attempt in range(max_retries):
|
||||
gen_name = get_new_bucket_name()
|
||||
try:
|
||||
client.create_bucket(Bucket=gen_name)
|
||||
return gen_name
|
||||
except ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyExists', 'BucketAlreadyOwnedByYou'):
|
||||
if attempt == max_retries - 1:
|
||||
raise Exception(f"Failed to create unique bucket after {max_retries} attempts")
|
||||
continue
|
||||
else:
|
||||
raise'''
|
||||
|
||||
updated = content
|
||||
updated = updated.replace(old_resource_func, new_resource_func)
|
||||
updated = updated.replace(old_client_func, new_client_func)
|
||||
|
||||
if updated == content:
|
||||
print("Patterns not found; appending override implementations to end of file.")
|
||||
append_patch = '''
|
||||
|
||||
# --- SeaweedFS override start ---
|
||||
from botocore.exceptions import ClientError as _Sw_ClientError
|
||||
|
||||
|
||||
# Idempotent create for provided name; generate unique only when no name given
|
||||
# Keep the bucket name stable when provided by the caller
|
||||
|
||||
def _sw_get_new_bucket_resource(name=None):
|
||||
s3 = boto3.resource('s3',
|
||||
aws_access_key_id=config.main_access_key,
|
||||
aws_secret_access_key=config.main_secret_key,
|
||||
endpoint_url=config.default_endpoint,
|
||||
use_ssl=config.default_is_secure,
|
||||
verify=config.default_ssl_verify)
|
||||
if name is not None:
|
||||
bucket = s3.Bucket(name)
|
||||
try:
|
||||
bucket.create()
|
||||
except _Sw_ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyOwnedByYou', 'BucketAlreadyExists'):
|
||||
return bucket
|
||||
raise
|
||||
else:
|
||||
return bucket
|
||||
# name not provided: generate unique
|
||||
max_retries = 10
|
||||
for attempt in range(max_retries):
|
||||
gen_name = get_new_bucket_name()
|
||||
bucket = s3.Bucket(gen_name)
|
||||
try:
|
||||
bucket.create()
|
||||
return bucket
|
||||
except _Sw_ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyExists', 'BucketAlreadyOwnedByYou'):
|
||||
if attempt == max_retries - 1:
|
||||
raise Exception(f"Failed to create unique bucket after {max_retries} attempts")
|
||||
continue
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
from botocore.exceptions import ClientError as _Sw2_ClientError
|
||||
|
||||
|
||||
def _sw_get_new_bucket(client=None, name=None):
|
||||
if client is None:
|
||||
client = get_client()
|
||||
if name is not None:
|
||||
try:
|
||||
client.create_bucket(Bucket=name)
|
||||
except _Sw2_ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyOwnedByYou', 'BucketAlreadyExists'):
|
||||
return name
|
||||
raise
|
||||
else:
|
||||
return name
|
||||
max_retries = 10
|
||||
for attempt in range(max_retries):
|
||||
gen_name = get_new_bucket_name()
|
||||
try:
|
||||
client.create_bucket(Bucket=gen_name)
|
||||
return gen_name
|
||||
except _Sw2_ClientError as e:
|
||||
code = e.response.get('Error', {}).get('Code')
|
||||
if code in ('BucketAlreadyExists', 'BucketAlreadyOwnedByYou'):
|
||||
if attempt == max_retries - 1:
|
||||
raise Exception(f"Failed to create unique bucket after {max_retries} attempts")
|
||||
continue
|
||||
else:
|
||||
raise
|
||||
|
||||
# Override original helper functions
|
||||
get_new_bucket_resource = _sw_get_new_bucket_resource
|
||||
get_new_bucket = _sw_get_new_bucket
|
||||
# --- SeaweedFS override end ---
|
||||
'''
|
||||
with open(file_path, "a", encoding="utf-8") as f:
|
||||
f.write(append_patch)
|
||||
print("Appended override implementations.")
|
||||
return True
|
||||
|
||||
with open(file_path, "w", encoding="utf-8") as f:
|
||||
f.write(updated)
|
||||
|
||||
print("Successfully patched s3-tests helpers.")
|
||||
return True
|
||||
|
||||
|
||||
def main() -> int:
|
||||
s3_tests_path = os.environ.get("S3_TESTS_PATH", "s3-tests")
|
||||
init_file_path = os.path.join(s3_tests_path, "s3tests", "functional", "__init__.py")
|
||||
print("Applying s3-tests patch for bucket creation idempotency...")
|
||||
print(f"Target repo path: {s3_tests_path}")
|
||||
if not os.path.exists(s3_tests_path):
|
||||
print(f"Warning: s3-tests directory not found at {s3_tests_path}")
|
||||
print("Skipping patch - directory structure may have changed in the upstream repository")
|
||||
return 0 # Return success to not break CI
|
||||
if not os.path.exists(init_file_path):
|
||||
print(f"Warning: Target file {init_file_path} not found")
|
||||
print("This may indicate the s3-tests repository structure has changed.")
|
||||
print("Skipping patch - tests may still work without it")
|
||||
return 0 # Return success to not break CI
|
||||
ok = patch_s3_tests_init_file(init_file_path)
|
||||
return 0 if ok else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
|
||||
|
||||
5
test/s3/compatibility/prepare.sh
Executable file
5
test/s3/compatibility/prepare.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
docker build --progress=plain -t s3tests .
|
||||
186
test/s3/compatibility/results.summary.txt
Normal file
186
test/s3/compatibility/results.summary.txt
Normal file
@@ -0,0 +1,186 @@
|
||||
/s3-tests/virtualenv/lib/python3.6/site-packages/boto3/compat.py:88: PythonDeprecationWarning: Boto3 will no longer support Python 3.6 starting May 30, 2022. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.7 or later. More information can be found here: https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/
|
||||
warnings.warn(warning, PythonDeprecationWarning)
|
||||
s3tests_boto3.functional.test_s3.test_bucket_list_return_data ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_write_to_nonexist_bucket ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_read_not_exist ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_requestid_matches_header_on_error ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multi_object_delete ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multi_objectv2_delete ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multi_object_delete_key_limit ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multi_objectv2_delete_key_limit ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_head_zero_bytes ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_check_etag ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_cache_control ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_expires ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_read_update_read_delete ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_metadata_replaced_on_put ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_write_file ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_anonymous_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_authenticated_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_authenticated_no_content_type ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_authenticated_request_bad_access_key ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_set_success_code ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_set_invalid_success_code ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_upload_larger_than_chunk ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_set_key_from_filename ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_ignored_header ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_case_insensitive_condition_fields ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_escaped_field_values ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_success_redirect_action ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_signature ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_access_key ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_date_format ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_no_key_specified ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_signature ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_policy_condition ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_user_specified_header ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_request_missing_policy_specified_field ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_condition_is_case_sensitive ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_expires_is_case_sensitive ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_expired_policy ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_request_field_value ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_expires_condition ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_conditions_list ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_upload_size_limit_exceeded ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_missing_content_length_argument ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_invalid_content_length_argument ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_upload_size_below_minimum ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_empty_conditions ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmatch_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifnonematch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifnonematch_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmodifiedsince_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifmodifiedsince_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifunmodifiedsince_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_object_ifunmodifiedsince_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_overwrite_existed_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifmatch_nonexisted_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_nonexisted_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_object_ifnonmatch_overwrite_existed_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_bucket_gone ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_delete_key_bucket_gone ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_object_gone ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_response_headers ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_bucket_acl ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_object_acl ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_bucket_gone ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_authenticated_object_gone ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_not_expired ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_out_range_zero ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_out_max_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_get_x_amz_expires_out_positive_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_anon_put ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_anon_put_write_access ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_put_authenticated ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_raw_put_authenticated_expired ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_canned_publicreadwrite ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_write ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_writeacp ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_read ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_acl_readacp ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_header_acl_grants ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_object_private ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_objectv2_private ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_object_publicread ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_objectv2_publicread ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_object_publicreadwrite ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_private_objectv2_publicreadwrite ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicread_object_private ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicread_object_publicread ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicread_object_publicreadwrite ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicreadwrite_object_private ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicreadwrite_object_publicread ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_access_bucket_publicreadwrite_object_publicreadwrite ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_bucket_create_special_key_names ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_zero_size ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_same_bucket ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_verify_contenttype ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_to_itself ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_to_itself_with_metadata ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_diff_bucket ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_not_owned_bucket ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_not_owned_object_bucket ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_canned_acl ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_retaining_metadata ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_replacing_metadata ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_bucket_not_found ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_copy_key_not_found ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_empty ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_small ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_small ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_invalid_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_improper_range ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_without_range ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_copy_special_names ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_resend_part ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_size_too_small ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_contents ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_overwrite_existing_object ... ok
|
||||
s3tests_boto3.functional.test_s3.test_abort_multipart_upload ... ok
|
||||
s3tests_boto3.functional.test_s3.test_abort_multipart_upload_not_found ... ok
|
||||
s3tests_boto3.functional.test_s3.test_list_multipart_upload ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_missing_part ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_upload_incorrect_etag ... ok
|
||||
s3tests_boto3.functional.test_s3.test_100_continue ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_atomic_read_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_read_4mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_read_8mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_4mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_8mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_write_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_write_4mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_write_8mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_conditional_write_1mb ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_dual_conditional_write_1mb ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_atomic_write_bucket_gone ... ok
|
||||
s3tests_boto3.functional.test_s3.test_atomic_multipart_upload_write ... ok
|
||||
s3tests_boto3.functional.test_s3.test_multipart_resend_first_finishes_last ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_big_request_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_skip_leading_bytes_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_return_trailing_bytes_response_code ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_invalid_range ... ok
|
||||
s3tests_boto3.functional.test_s3.test_ranged_request_empty_object ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_obj_tagging ... ok
|
||||
s3tests_boto3.functional.test_s3.test_get_obj_head_tagging ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_max_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_excess_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_max_kvsize_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_excess_key_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_excess_val_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_modify_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_put_delete_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_post_object_tags_anonymous_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_post_object_tags_authenticated_request ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_put_obj_with_tags ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_multi_delete_object_with_retention ... ERROR
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_changing_mode_from_governance_with_bypass ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_changing_mode_from_governance_without_bypass ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_object_lock_changing_mode_from_compliance ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifmatch_good ... ok
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifmatch_failed ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifnonematch_good ... FAIL
|
||||
s3tests_boto3.functional.test_s3.test_copy_object_ifnonematch_failed ... ok
|
||||
s3tests_boto3.functional.test_s3.test_object_read_unreadable ... FAIL
|
||||
ERROR
|
||||
|
||||
======================================================================
|
||||
ERROR: s3tests_boto3.functional.test_s3.test_bucket_list_return_data
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
|
||||
self.test(*self.arg)
|
||||
File "/s3-tests/s3tests_boto3/functional/test_s3.py", line 1669, in test_bucket_list_return_data
|
||||
'DisplayName': acl_response['Owner']['DisplayName'],
|
||||
KeyError: 'Owner'
|
||||
-------------------- >> begin captured logging << --------------------
|
||||
85
test/s3/compatibility/run.sh
Executable file
85
test/s3/compatibility/run.sh
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CONTAINER_NAME=${CONTAINER_NAME:-s3test-instance}
|
||||
CONF_FILE=${CONF_FILE:-s3tests.conf}
|
||||
WEED_BIN=${WEED_BIN:-../../../weed/weed}
|
||||
TEST_RAW_OUTPUT_FILE=${TEST_RAW_OUTPUT_FILE:-compat.raw.txt}
|
||||
TEST_PROCESSED_OUTPUT_FILE=${TEST_PROCESSED_OUTPUT_FILE:-compat.summary.txt}
|
||||
|
||||
# Set up debugging for this bash script if DEBUG is set
|
||||
if [ -n "${DEBUG}" ]; then
|
||||
echo -e "DEBUG set [${DEBUG}], enabling debugging output...";
|
||||
set -ex
|
||||
fi
|
||||
|
||||
# Reset from possible previous test run
|
||||
killall -9 weed || echo "already stopped"
|
||||
rm -Rf tmp
|
||||
mkdir tmp
|
||||
docker stop $CONTAINER_NAME || echo "already stopped"
|
||||
|
||||
# Ensure ulimit is set to reasonable value
|
||||
ulimit -n 10000
|
||||
|
||||
# Start weed w/ filer + s3 in the background
|
||||
$WEED_BIN mini \
|
||||
-master.volumeSizeLimitMB 5 \
|
||||
-dir "$(pwd)/tmp" \
|
||||
1>&2>weed.log &
|
||||
|
||||
# Wait for master to start up
|
||||
echo -e "\n[info] waiting for master @ 9333...";
|
||||
until curl --output /dev/null --silent --head --fail http://127.0.0.1:9333; do
|
||||
printf '.';
|
||||
sleep 5;
|
||||
done
|
||||
sleep 3;
|
||||
|
||||
# Wait for s3 to start up
|
||||
echo -e "\n[info] waiting for S3 @ 8333...";
|
||||
until curl --output /dev/null --silent --fail http://127.0.0.1:8333; do
|
||||
printf '.';
|
||||
sleep 5;
|
||||
done
|
||||
sleep 3;
|
||||
|
||||
# Determine whether docker net
|
||||
DOCKER_NET_HOST_ARGS=""
|
||||
if [ -n "${DOCKER_NET_HOST}" ]; then
|
||||
DOCKER_NET_HOST_ARGS="--net=host"
|
||||
echo -e "\n[info] setting docker to het nost"
|
||||
fi
|
||||
|
||||
echo -e "\n[warn] You may have to run with UNFILTERED=y to disable output filtering, if you get the broken pipe error";
|
||||
echo -e "\n[info] running tests with unfiltered output...";
|
||||
docker run \
|
||||
--name $CONTAINER_NAME \
|
||||
--rm \
|
||||
${DOCKER_NET_HOST_ARGS} \
|
||||
-e S3TEST_CONF=$CONF_FILE \
|
||||
-v "$(pwd)"/$CONF_FILE:/s3-tests/s3tests.conf \
|
||||
-it \
|
||||
s3tests \
|
||||
./virtualenv/bin/nosetests \
|
||||
s3tests_boto3/functional/test_s3.py \
|
||||
-v \
|
||||
-a 'resource=object,!bucket-policy,!versioning,!encryption' \
|
||||
| tee ${TEST_RAW_OUTPUT_FILE}
|
||||
|
||||
# If the summary logs are present, process them
|
||||
if [ -f "${TEST_RAW_OUTPUT_FILE}" ]; then
|
||||
cat ${TEST_RAW_OUTPUT_FILE} | sed -n -e '/botocore.hooks/!p;//q' | tee ${TEST_PROCESSED_OUTPUT_FILE}
|
||||
echo -e "\n[info] ✅ Successfully wrote processed output @ [${TEST_PROCESSED_OUTPUT_FILE}]";
|
||||
if [ -z "${TEST_KEEP_RAW_OUTPUT}" ]; then
|
||||
echo -e "\n[info] removing test raw output file @ [${TEST_RAW_OUTPUT_FILE}] (to disable this, set TEST_KEEP_RAW_OUTPUT=y)...";
|
||||
rm -rf ${TEST_RAW_OUTPUT_FILE};
|
||||
fi
|
||||
else
|
||||
echo -e "\n[warn] failed to find raw output @ [${TEST_RAW_OUTPUT_FILE}]";
|
||||
fi
|
||||
|
||||
echo -e "\n[info] stopping [${CONTAINER_NAME}] container...";
|
||||
docker stop $CONTAINER_NAME || echo "[info] already stopped";
|
||||
|
||||
echo -e "\n[info] stopping seaweedfs processes (all, via kill -9)...";
|
||||
killall -9 weed;
|
||||
117
test/s3/compatibility/s3tests.conf
Normal file
117
test/s3/compatibility/s3tests.conf
Normal file
@@ -0,0 +1,117 @@
|
||||
[DEFAULT]
|
||||
## this section is just used for host, port and bucket_prefix
|
||||
|
||||
# host set for rgw in vstart.sh
|
||||
host = host.docker.internal
|
||||
|
||||
## NOTE: if running docker --net=host (e.x. `DOCKER_NET_HOST=y ./run.sh`)
|
||||
## then use 'localhost', so the container can more easily access your *local* weed instance
|
||||
##
|
||||
## This is *unsafe* -- it is possible that this script will do malicious
|
||||
## things with host-level access. only run this if you trust the programmatic content of
|
||||
## ceph/s3-tests (https://github.com/ceph/s3-tests) which will be using this file
|
||||
#host = localhost
|
||||
|
||||
# port set for rgw in vstart.sh
|
||||
port = 8333
|
||||
|
||||
## say "False" to disable TLS
|
||||
is_secure = False
|
||||
|
||||
## say "False" to disable SSL Verify
|
||||
ssl_verify = False
|
||||
|
||||
[fixtures]
|
||||
## all the buckets created will start with this prefix;
|
||||
## {random} will be filled with random characters to pad
|
||||
## the prefix to 30 characters long, and avoid collisions
|
||||
bucket prefix = yournamehere-{random}-
|
||||
|
||||
[s3 main]
|
||||
# main display_name set in vstart.sh
|
||||
display_name = M. Tester
|
||||
|
||||
# main user_idname set in vstart.sh
|
||||
user_id = testid
|
||||
|
||||
# main email set in vstart.sh
|
||||
email = tester@ceph.com
|
||||
|
||||
# zonegroup api_name for bucket location
|
||||
api_name = default
|
||||
|
||||
## main AWS access key
|
||||
access_key = 0555b35654ad1656d804
|
||||
|
||||
## main AWS secret key
|
||||
secret_key = h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q==
|
||||
|
||||
## replace with key id obtained when secret is created, or delete if KMS not tested
|
||||
#kms_keyid = 01234567-89ab-cdef-0123-456789abcdef
|
||||
|
||||
[s3 alt]
|
||||
# alt display_name set in vstart.sh
|
||||
display_name = john.doe
|
||||
## alt email set in vstart.sh
|
||||
email = john.doe@example.com
|
||||
|
||||
# alt user_id set in vstart.sh
|
||||
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
|
||||
|
||||
# alt AWS access key set in vstart.sh
|
||||
access_key = NOPQRSTUVWXYZABCDEFG
|
||||
|
||||
# alt AWS secret key set in vstart.sh
|
||||
secret_key = nopqrstuvwxyzabcdefghijklmnabcdefghijklm
|
||||
|
||||
[s3 tenant]
|
||||
# tenant display_name set in vstart.sh
|
||||
display_name = testx$tenanteduser
|
||||
|
||||
# tenant user_id set in vstart.sh
|
||||
user_id = 9876543210abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
|
||||
# tenant AWS secret key set in vstart.sh
|
||||
access_key = HIJKLMNOPQRSTUVWXYZA
|
||||
|
||||
# tenant AWS secret key set in vstart.sh
|
||||
secret_key = opqrstuvwxyzabcdefghijklmnopqrstuvwxyzab
|
||||
|
||||
# tenant email set in vstart.sh
|
||||
email = tenanteduser@example.com
|
||||
|
||||
#following section needs to be added for all sts-tests
|
||||
[iam]
|
||||
#used for iam operations in sts-tests
|
||||
#email from vstart.sh
|
||||
email = s3@example.com
|
||||
|
||||
#user_id from vstart.sh
|
||||
user_id = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
|
||||
#access_key from vstart.sh
|
||||
access_key = ABCDEFGHIJKLMNOPQRST
|
||||
|
||||
#secret_key vstart.sh
|
||||
secret_key = abcdefghijklmnopqrstuvwxyzabcdefghijklmn
|
||||
|
||||
#display_name from vstart.sh
|
||||
display_name = youruseridhere
|
||||
|
||||
#following section needs to be added when you want to run Assume Role With Webidentity test
|
||||
[webidentity]
|
||||
#used for assume role with web identity test in sts-tests
|
||||
#all parameters will be obtained from ceph/qa/tasks/keycloak.py
|
||||
token=<access_token>
|
||||
|
||||
aud=<obtained after introspecting token>
|
||||
|
||||
sub=<obtained after introspecting token>
|
||||
|
||||
azp=<obtained after introspecting token>
|
||||
|
||||
user_token=<access token for a user, with attribute Department=[Engineering, Marketing>]
|
||||
|
||||
thumbprint=<obtained from x509 certificate>
|
||||
|
||||
KC_REALM=<name of the realm>
|
||||
Reference in New Issue
Block a user