Skip to content

test(s3): cover batch delete default force header#130

Draft
overtrue wants to merge 1 commit intomainfrom
codex/rm-batch-delete-force-header-gap
Draft

test(s3): cover batch delete default force header#130
overtrue wants to merge 1 commit intomainfrom
codex/rm-batch-delete-force-header-gap

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Summary

This change adds focused coverage for the batch delete path introduced by the RustFS force-delete support.
The recent rm --purge work already verified that batched deletes send the custom header when force delete is enabled, but it did not cover the opposite branch.
Without this test, a regression could silently start sending the RustFS-specific header on ordinary batch deletes.

Root cause

The feature added conditional header wiring in both single-object and batch delete requests.
Only the positive batch case was exercised, so the default path remained unverified.

Fix

Add a unit test in rc-s3 that issues delete_objects_with_options with DeleteRequestOptions::default() and asserts that x-rustfs-force-delete is omitted.
The change stays within the recent delete-path work and does not alter runtime behavior.

Validation

  • cargo test -p rc-s3 delete_objects_without_force_delete_omits_rustfs_header
  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

Notes

make pre-commit is not available in this repository, so validation used the equivalent CI commands defined in AGENTS.md and .github/workflows/ci.yml.

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