Skip to content

test(event): cover blank event input fallback#74

Draft
overtrue wants to merge 1 commit intomainfrom
codex/event-blank-input-test-gap
Draft

test(event): cover blank event input fallback#74
overtrue wants to merge 1 commit intomainfrom
codex/event-blank-input-test-gap

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Summary

This change adds a focused regression test for the event add parsing path when users provide blank --event values such as empty strings or comma-only input.

Problem

The recent event-name normalization work updated parse_event_list, but the fallback branch where filtering removes every provided token was still untested. That left a small gap around a real CLI input shape: users can still pass syntactically present but semantically blank event values.

Root Cause

parse_event_list trims and filters each requested event before deciding whether to apply the default s3:ObjectCreated:* event. The no-input case already had coverage, but the distinct path where inputs are present and collapse to an empty list after trimming did not.

Fix

Add test_parse_event_list_defaults_when_inputs_are_blank in crates/cli/src/commands/event.rs. The test asserts that blank and comma-only values still trigger the same default event fallback as an entirely empty event list.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

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