test: close coverage gaps and harden e2e strategy#38
Conversation
There was a problem hiding this comment.
Pull request overview
This PR strengthens rustfs/cli integration/e2e coverage against the rustfs/rustfs:latest image and adjusts client/runtime defaults to improve compatibility and surface failures deterministically.
Changes:
- Added new integration coverage for recursive S3→S3 moves and bucket quota lifecycle (set/info/clear).
- Updated S3 client behavior for backend compatibility (small single-part uploads + checksum policy).
- Refactored the GitHub Actions integration workflow into layered jobs (smoke vs full vs golden) and switched examples/runtime to
rustfs/rustfs:latest.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docker/docker-compose.yml | Switches RustFS image to latest for local e2e parity with CI. |
| crates/s3/src/client.rs | Limits single-part uploads to 64 MiB (in-memory body) and sets checksum calculation/validation to “WhenRequired”. |
| crates/core/src/admin/types.rs | Defaults BucketQuota.quota_type to HARD when missing; adds unit test. |
| crates/cli/tests/integration.rs | Adds integration tests for recursive mv prefix behavior and quota set/info/clear lifecycle. |
| crates/cli/src/commands/mv.rs | Implements recursive S3→S3 move by listing prefix contents then copy+delete per object, with JSON summary. |
| .github/workflows/integration.yml | Splits integration into smoke/full/golden jobs and runs smoke on PRs against RustFS latest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Recursive move for prefix/directory semantics. | ||
| if args.recursive { | ||
| let mut continuation_token: Option<String> = None; | ||
| let mut moved_count = 0usize; | ||
| let mut error_count = 0usize; | ||
| let src_prefix = src.key.clone(); |
There was a problem hiding this comment.
Recursive S3→S3 moves currently list and then copy/delete objects while iterating. If the destination prefix is inside the source prefix (e.g. moving a/ to a/b/ in the same bucket), newly created destination objects can match the source listing prefix and be moved again, leading to duplicated work and potential data loss. Consider explicitly rejecting overlapping src/dst prefixes for recursive moves and/or doing a two-phase approach (list all keys first, then perform copy+delete) similar to rm’s delete_recursive implementation.
Summary
This PR focuses on closing current test coverage gaps and hardening the e2e/integration strategy for
rustfs/cliagainst the latest RustFS image.What Changed
object_operations::test_move_recursive_prefix_s3_to_s3quota_operations::test_bucket_quota_set_info_clearrustfs/rustfs:latest.smoke-latest: required PR/push smoke checks on latest RustFSfull-latest: scheduled/manual full integration suite on latest RustFSgolden: isolated golden-output verification pathWhy
Current coverage was missing critical behavior paths in move/quota workflows and e2e checks were not clearly separated by execution cost and confidence level. This made regressions harder to catch early and reduced feedback signal quality in PR checks.
Validation
Local validation completed on this branch:
cargo fmt --all --checkcargo clippy --workspace -- -D warningscargo test --workspaceTEST_S3_ENDPOINT=http://localhost:9000TEST_S3_ACCESS_KEY=accesskeyTEST_S3_SECRET_KEY=secretkeycargo test --package rustfs-cli --test integration --features integration -- --test-threads=1Integration result: 37 passed, 0 failed.
Scope Notes