Skip to content

Feat/add buildapp tests#6645

Open
theycallmeaabie wants to merge 4 commits intopipe-cd:masterfrom
theycallmeaabie:feat/add-buildapp-tests
Open

Feat/add buildapp tests#6645
theycallmeaabie wants to merge 4 commits intopipe-cd:masterfrom
theycallmeaabie:feat/add-buildapp-tests

Conversation

@theycallmeaabie
Copy link
Copy Markdown
Contributor

What this PR does:
Adds tests for the buildApp function in pkg/app/pipedv1/planpreview/builder.go and removes the TODO comment.

Why we need it:
There was an existing TODO asking for test coverage on buildApp. The new tests cover error handling for API failures, missing deploy sources, plugin registry errors, and the happy path with plugin plan preview results.

Does this PR introduce a user-facing change?:

  • How are users affected by this change: None, test-only change.
  • Is this breaking change: No
  • How to migrate (if breaking change): N/A

Signed-off-by: theycallmeaabie <theycallmeaabie@gmail.com>
Signed-off-by: theycallmeaabie <theycallmeaabie@gmail.com>
Copilot AI review requested due to automatic review settings April 5, 2026 00:08
@theycallmeaabie theycallmeaabie requested a review from a team as a code owner April 5, 2026 00:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds unit tests around builder.buildApp execution paths and removes an obsolete TODO requesting such coverage.

Changes:

  • Added TestBuildApp table tests covering API failures, missing deploy source, plugin registry failures, plugin behaviors, and a happy path.
  • Introduced supporting fakes for API client, repo/worktree, secret decrypter, and plugin registry/client.
  • Removed the // TODO: add tests comment above buildApp.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
pkg/app/pipedv1/planpreview/builder_test.go Adds fakes and a new table-driven test suite to exercise buildApp scenarios.
pkg/app/pipedv1/planpreview/builder.go Removes the TODO comment now that buildApp has tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: theycallmeaabie <theycallmeaabie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants