Skip to content

test(cli): cover version output contract#138

Merged
overtrue merged 1 commit intomainfrom
codex/test-gap-detection-e233
Apr 19, 2026
Merged

test(cli): cover version output contract#138
overtrue merged 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

@overtrue overtrue force-pushed the codex/test-gap-detection-e233 branch from 045850e to b34215f Compare April 19, 2026 15:15
@overtrue overtrue marked this pull request as ready for review April 19, 2026 15:15
@overtrue overtrue merged commit 7d0c0de into main Apr 19, 2026
15 checks passed
@overtrue overtrue deleted the codex/test-gap-detection-e233 branch April 19, 2026 15:23
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