Dedupe near-duplicate deploy tests - #319
Merged
Merged
Conversation
Fold the two deploy request tests into a shared helper parameterized on whether the manifest has an id.
nicomiguelino
requested review from
sergey-borovkov
and
a lite review from Copilot
September 3, 2026 14:55
There was a problem hiding this comment.
🟢 Approval recommended
The change is a straightforward test refactor that preserves the same mocked request expectations while removing duplicated code.
Pull request overview
Refactors the edge_app deploy request tests to remove near-duplicate test bodies while preserving coverage of both “app id comes from manifest” and “explicit app id with no manifest id” behaviors.
Changes:
- Introduces a shared helper
run_deploy_should_send_correct_requests_test(id_in_manifest: bool)for the deploy-request mock/assert sequence. - Updates the two existing deploy tests to delegate to the helper with
true/false, toggling whethermanifest.idis present and whetherdeploy()is called with an explicitapp_id.
File summaries
| File | Description |
|---|---|
| src/commands/edge_app/app.rs | Deduplicates two near-identical deploy tests into a shared helper while keeping both scenarios exercised. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sergey-borovkov
approved these changes
Sep 3, 2026
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
test_deploy_should_send_correct_requestsandtest_deploy_with_explicit_app_id_and_no_manifest_id_should_send_correct_requestsinto a single shared helper,run_deploy_should_send_correct_requests_test(id_in_manifest: bool), called withtrueandfalse.Test plan
cargo buildcargo test(only known pre-existing unrelated failure:authentication::tests::test_read_token_correct_token_is_returned)cargo clippy --all-targets -- -D warningscargo fmt --check