Skip to content

test(cli): cover noun-first list aliases#115

Merged
overtrue merged 1 commit intomainfrom
codex/noun-first-list-alias-gap
Apr 19, 2026
Merged

test(cli): cover noun-first list aliases#115
overtrue merged 1 commit intomainfrom
codex/noun-first-list-alias-gap

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented Apr 12, 2026

Summary

This adds focused parser coverage for the noun-first ls aliases introduced with the recent bucket/object command groups.

Problem

The command-group work in #76 added bucket and object entrypoints with ls as an alias for list, but the parser tests in crates/cli/src/commands/mod.rs did not assert those alias routes. That left a small regression window where the alias wiring could drift without a fast unit test catching it.

Root cause

Existing parser coverage around the noun-first surface focused on bucket cors and other follow-up gaps, but not on the ls aliases attached directly to BucketCommands::List and ObjectCommands::List.

Fix

The patch keeps scope tight to crates/cli/src/commands/mod.rs:

  • add cli_accepts_bucket_list_alias for rc bucket ls local/
  • add cli_accepts_object_list_alias for rc object ls local/my-bucket/logs/

Both assertions verify clap dispatch reaches the expected noun-first command variants and preserves the parsed path.

Validation

I ran:

  • cargo test -p rustfs-cli cli_accepts_bucket_list_alias --lib -- --nocapture
  • cargo test -p rustfs-cli cli_accepts_object_list_alias --lib -- --nocapture
  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

I also ran make pre-commit per the automation instructions, but this checkout does not define that target:

text
make: *** No rule to make target pre-commit'. Stop.

@overtrue overtrue force-pushed the codex/noun-first-list-alias-gap branch from dbc6ddf to 2761308 Compare April 19, 2026 15:11
@overtrue overtrue marked this pull request as ready for review April 19, 2026 15:12
@overtrue overtrue merged commit 9037091 into main Apr 19, 2026
15 checks passed
@overtrue overtrue deleted the codex/noun-first-list-alias-gap branch April 19, 2026 15:21
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