Skip to content

test(s3): cover delete option defaults#83

Draft
overtrue wants to merge 3 commits intomainfrom
codex/test-gap-delete-options
Draft

test(s3): cover delete option defaults#83
overtrue wants to merge 3 commits intomainfrom
codex/test-gap-delete-options

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented Apr 3, 2026

Summary

Recent rm --purge work added RustFS-specific delete request options, and the follow-up test PR already covered the S3 client defaults for batch deletes. One command-layer behavior was still untested: ordinary rm --force should not silently enable RustFS permanent deletion unless --purge is explicitly set.

Root Cause

The CLI wiring introduced DeleteRequestOptions and mapped --purge into force_delete, but the unit tests only asserted the positive purge = true path. That left a regression window where a future refactor could accidentally treat the long-standing --force flag as a permanent-delete signal.

Fix

This PR now covers both sides of the option mapping:

  • purge = true enables force_delete
  • force = true with purge = false keeps force_delete disabled

The production code is unchanged. The diff stays limited to focused tests around the recent delete-option work.

Validation

This checkout does not define a make pre-commit target, so I ran the repository's required Rust validation commands directly instead:

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

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.

1 participant