Skip to content

test: close coverage gaps and harden e2e strategy#38

Merged
overtrue merged 3 commits intomainfrom
overtrue/e2e-test-plan-upgrade
Mar 8, 2026
Merged

test: close coverage gaps and harden e2e strategy#38
overtrue merged 3 commits intomainfrom
overtrue/e2e-test-plan-upgrade

Conversation

@overtrue
Copy link
Contributor

@overtrue overtrue commented Mar 8, 2026

Summary

This PR focuses on closing current test coverage gaps and hardening the e2e/integration strategy for rustfs/cli against the latest RustFS image.

What Changed

  • Added missing integration coverage for high-risk object operation behavior:
    • object_operations::test_move_recursive_prefix_s3_to_s3
  • Added end-to-end coverage for bucket quota lifecycle behavior:
    • quota_operations::test_bucket_quota_set_info_clear
  • Updated integration docs/examples and runtime defaults to use rustfs/rustfs:latest.
  • Refactored CI integration pipeline into layered jobs:
    • smoke-latest: required PR/push smoke checks on latest RustFS
    • full-latest: scheduled/manual full integration suite on latest RustFS
    • golden: isolated golden-output verification path
  • Removed permissive integration behavior so failures are surfaced deterministically.

Why

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 --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • Full integration run with RustFS latest:
    • TEST_S3_ENDPOINT=http://localhost:9000
    • TEST_S3_ACCESS_KEY=accesskey
    • TEST_S3_SECRET_KEY=secretkey
    • cargo test --package rustfs-cli --test integration --features integration -- --test-threads=1

Integration result: 37 passed, 0 failed.

Scope Notes

  • No CLI contract/schema breaking changes were introduced.
  • Primary focus is test completion and e2e strategy hardening.

Copilot AI review requested due to automatic review settings March 8, 2026 20:05
@overtrue overtrue merged commit 836d11b into main Mar 8, 2026
16 checks passed
@overtrue overtrue deleted the overtrue/e2e-test-plan-upgrade branch March 8, 2026 20:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +276 to +281
// 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();
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants