Use the existing shell_app helper in the channel e2e tests

Open Beginner friendly
#331 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
testing-qa

Research direction

Start in crates/shep-daemon/tests/daemon_e2e/channel.rs at lines 76, 131, 179, and 261, and compare the duplicated setup with shell_app() in app_configs.rs. Replace each setup block while preserving the extra channel or stdin fields. Run cargo test -p shep-daemon --test daemon_e2e to catch snapshot changes, then cargo fmt --all --check and the specified clippy command.

Written by the indexing model from the issue text.

Description

area: daemon duplication good first issue hacktoberfest help wanted priority: P3 test-code

AppConfig::minimal + interpreter="none" + args=vec!["-c", script] is hand-built in four tests, duplicating shell_app() in app_configs.rs

Sites:

  • crates/shep-daemon/tests/daemon_e2e/channel.rs:76,131,179,261

Suggested shape: replace each block with shell_app(name, script) then set the extra field (channel, stdin) on the returned AppConfig

Before you start

A helper that wraps assertions needs #[track_caller], or a failure stops naming the line that failed. A helper that wraps setup does not, and most of these are setup.

Moving a test also renames its insta snapshot, because the filename comes from the module path. Only a real run catches that.

Checking it
cargo test -p shep-daemon --test daemon_e2e

Then cargo fmt --all --check and cargo clippy --workspace --all-targets --all-features -- -D warnings.

Found by a local model sweeping for duplication, then checked by hand. If you think the copies should stay copies, say so on the issue. That is a real answer.

Dominant language
Rust
Stars
11
Forks
1
Avg merge
6h 40m
Merged PRs (30d)
288

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shep-pm/shep

All issues in shep-pm/shep

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.