Skip to content

test(cli): cover version output contract#138

Draft
overtrue wants to merge 1 commit intomainfrom
codex/test-gap-detection-e233
Draft

test(cli): cover version output contract#138
overtrue wants to merge 1 commit intomainfrom
codex/test-gap-detection-e233

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Summary

Adds a focused CLI contract test for the latest version bump path. The help contract suite already checked that the global --version option is discoverable, but it did not assert that running rc --version reports the package version compiled into the binary.

Root cause

Version bump changes can update Cargo metadata without a fast test proving the binary output follows that metadata. A stale or mismatched version string would make release verification harder for users and downstream packaging.

Changes

  • Added binary_version_matches_package_version to the help contract suite.
  • Added a minimal Makefile pre-commit target because this automation requires make pre-commit before PR submission and the repository did not define that target.

Validation

  • cargo test -p rustfs-cli --test help_contract binary_version_matches_package_version
  • make pre-commit

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