Skip to content

test(admin): cover expand status dispatch#186

Merged
overtrue merged 2 commits intomainfrom
codex/test-admin-expand-status
May 9, 2026
Merged

test(admin): cover expand status dispatch#186
overtrue merged 2 commits intomainfrom
codex/test-admin-expand-status

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented May 7, 2026

Related Issue(s)

None.

Problem Background and User Impact

The recent expansion workflow added rc admin expand status as a post-expansion rebalance command. The existing follow-up coverage verified command parsing, help text, scale start, and expand stop, but the status dispatch path was still untested at the CLI wrapper layer.

Root Cause Summary

admin expand status delegates to the shared rebalance status implementation. Without an integration test, a future regression could accidentally remove or misroute that branch while lower-level rebalance route tests still pass.

Solution Overview

This PR adds one focused non-Windows integration test that runs rc --json admin expand status against the loopback admin test server, asserts the JSON rebalance status payload is returned, and verifies the CLI sends a GET request to /rustfs/admin/v3/rebalance/status.

Test Status

  • cargo test -p rustfs-cli --test admin_expand expand_status_dispatches_to_rebalance_status_json -- --nocapture
  • make pre-commit

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

This PR adds missing CLI-wrapper integration coverage for the rc admin expand status command to ensure it correctly dispatches to the shared rebalance status endpoint and returns the expected JSON payload.

Changes:

  • Adds a new non-Windows integration test that runs rc --json admin expand status <alias> against the loopback admin test server.
  • Asserts the command returns JSON containing rebalance status fields and verifies the CLI performs a GET to /rustfs/admin/v3/rebalance/status.

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

Comment thread crates/cli/tests/admin_expand.rs
@overtrue overtrue merged commit a52683c into main May 9, 2026
15 checks passed
@overtrue overtrue deleted the codex/test-admin-expand-status branch May 9, 2026 13:17
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