Skip to content

test(s3): cover decommission start by-id query#178

Merged
overtrue merged 1 commit intomainfrom
codex/test-decommission-start-by-id-query
May 7, 2026
Merged

test(s3): cover decommission start by-id query#178
overtrue merged 1 commit intomainfrom
codex/test-decommission-start-by-id-query

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented May 7, 2026

Related

  • Follow-up test-gap coverage for recent admin pool/decommission routing changes.

Background

Recent admin command work added decommission start support for pool command lines and --by-id pool identifiers. Existing route tests covered decommission start with a pool command line and decommission cancel with --by-id, but the start path did not directly assert the multi-pool --by-id query contract.

Solution

Add a focused rc-s3 admin client test that calls decommission_start with PoolTarget { pool: "1,2", by_id: true } and verifies the signed request uses /rustfs/admin/v3/pools/decommission?pool=1%2C2&by-id=true with an empty body.

Tests

  • cargo test -p rc-s3 test_decommission_start_posts_by_id_multi_pool_query --lib
  • cargo test -p rustfs-cli admin::tests --lib
  • cargo test -p rc-s3 admin::tests --lib
  • make pre-commit

@overtrue overtrue marked this pull request as ready for review May 7, 2026 00:18
Copilot AI review requested due to automatic review settings May 7, 2026 00:18
Copy link
Copy Markdown
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

Adds targeted regression coverage in the S3 admin client test suite to ensure decommission_start correctly encodes multi-pool --by-id targets in the query string, matching the expected admin routing contract.

Changes:

  • Add a new Tokio test that calls decommission_start with PoolTarget { pool: "1,2", by_id: true }.
  • Assert the outgoing signed request uses POST /rustfs/admin/v3/pools/decommission?pool=1%2C2&by-id=true and sends an empty body.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overtrue overtrue merged commit f37712e into main May 7, 2026
19 checks passed
@overtrue overtrue deleted the codex/test-decommission-start-by-id-query branch May 7, 2026 02:59
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