Skip to content

refactor(cli): split integration tests by subcommand#58

Merged
mostafa merged 1 commit into
mainfrom
feat/modularize-cli-tests
Apr 30, 2026
Merged

refactor(cli): split integration tests by subcommand#58
mostafa merged 1 commit into
mainfrom
feat/modularize-cli-tests

Conversation

@mostafa
Copy link
Copy Markdown
Member

@mostafa mostafa commented Apr 30, 2026

Summary

  • Split the 1745-line crates/rsigma-cli/tests/cli.rs into 5 focused test files + a shared common/mod.rs module
  • Single-use fixture constants colocated with their test file to minimize dead_code warnings
  • No logic or assertion changes; pure file reorganization

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets --all-features -- -D warnings passes
  • cargo test --workspace passes (all integration tests run from their new files)

Split the 1745-line monolithic test file into focused modules:
- common/mod.rs: shared helpers (rsigma(), temp_file()) and fixtures
- cli_parse.rs: parse, condition, stdin subcommands
- cli_validate.rs: validate subcommand
- cli_eval.rs: eval subcommand (detection, pipeline, jq, correlation, filter)
- cli_lint.rs: lint subcommand including --fix tests
- cli_daemon.rs: daemon state persistence and streaming pipeline tests

Single-use fixture constants are colocated with their test file to
avoid dead_code warnings across integration test binaries.
@mostafa mostafa merged commit 3f7746f into main Apr 30, 2026
8 checks passed
@mostafa mostafa deleted the feat/modularize-cli-tests branch April 30, 2026 20:33
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