Skip to content

test(cli): cover recursive rm purge on versioned prefix#87

Draft
overtrue wants to merge 1 commit intomainfrom
codex/test-rm-recursive-purge-gap
Draft

test(cli): cover recursive rm purge on versioned prefix#87
overtrue wants to merge 1 commit intomainfrom
codex/test-rm-recursive-purge-gap

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented Apr 4, 2026

Summary

This adds focused integration coverage for the recursive rm --purge path on versioned objects.

The recent rm --purge change already had coverage for deleting a single versioned object, but the recursive prefix path goes through a different code path: it lists keys, batches them, and issues delete_objects_with_options with the purge flag. That meant the end-to-end behavior for permanent deletion under --recursive --purge was still untested.

This PR adds one integration test that enables bucket versioning, uploads two objects under the same prefix, removes that prefix with rm --recursive --purge, and then verifies that each object's version history is empty. The test stays close to the changed feature and avoids unrelated refactoring.

Validation

I ran the repository validation commands directly because this checkout does not define a make pre-commit target:

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

I also ran the new targeted integration test with:

  • cargo test -p rustfs-cli test_rm_recursive_purge_permanently_deletes_versioned_prefix --test integration --features integration -- --nocapture

In this environment that targeted integration test compiled and executed but skipped because the required S3 integration configuration was not available, which matches the rest of the integration suite behavior.

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