Open
Conversation
Contributor
There was a problem hiding this comment.
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
GETto/rustfs/admin/v3/rebalance/status.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue(s)
None.
Problem Background and User Impact
The recent expansion workflow added
rc admin expand statusas a post-expansion rebalance command. The existing follow-up coverage verified command parsing, help text,scale start, andexpand stop, but the status dispatch path was still untested at the CLI wrapper layer.Root Cause Summary
admin expand statusdelegates 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 statusagainst the loopback admin test server, asserts the JSON rebalance status payload is returned, and verifies the CLI sends aGETrequest to/rustfs/admin/v3/rebalance/status.Test Status
cargo test -p rustfs-cli --test admin_expand expand_status_dispatches_to_rebalance_status_json -- --nocapturemake pre-commit