test(cli): cover top-level event parser aliases#125
Draft
Conversation
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.
Summary
This adds focused parser coverage for the deprecated top-level
rc evententrypoints that were rewired throughEventArgsin the recent command-surface updates.The current parser tests cover nested
rc bucket event ...forms and one top-levelrc event list ...compatibility path, but they do not assert that the top-leveladdandremoveflows still deserialize correctly. That leaves a regression gap around the exact deprecated aliases users may still invoke after theCommands::Event(event::EventArgs)wiring change.Root cause
Coverage stopped at the list alias. The parser test suite did not exercise the more argument-heavy top-level
event addandevent removebranches, so a clap wiring regression there could go unnoticed while adjacent tests still passed.Fix
Add two parser tests in
crates/cli/src/commands/mod.rsthat verify:rc event add <path> <arn> --event put,delete --forcerc event remove <path> <arn> --forceBoth assertions confirm the top-level deprecated entrypoint still resolves through
EventArgs, preserves the expected positional arguments, and forwards the--forceand--eventflags.Validation
I ran these successfully:
cargo test -p rustfs-cli cli_accepts_top_level_event_ --libcargo fmt --all --checkcargo clippy --workspace -- -D warningscargo test --workspaceI also attempted
make pre-commitbecause the automation requires it, butorigin/maindoes not define apre-committarget, somakeexits withNo rule to make target 'pre-commit'.