Make unit tests independent of external services - #2193
Make unit tests independent of external services#2193officialasishkumar wants to merge 1 commit into
Conversation
Replace command and scanner dependencies in unit tests with package-local fakes, and use local test registries/listeners instead of public services.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Could you please sign off your commit so the DCO check passes? You can amend it with git commit --amend -s --no-edit and force-push the update. |
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package main_test | ||
| package main |
There was a problem hiding this comment.
We cannot do this. The price of hermetic tests cannot be to mix test and production code into a single package. Whether it actually affects binary size with the global Describe call in Ginkgo style and the dot imports I am not entirely sure, but I assume so.
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package git_test | ||
| package git |
Changes
Related Issue
Fixes #1865
Type of PR
/kind bug
Submitter Checklist
Release Notes