Skip to content

Make unit tests independent of external services#2193

Open
officialasishkumar wants to merge 1 commit into
shipwright-io:mainfrom
officialasishkumar:fix/hermetic-unit-tests
Open

Make unit tests independent of external services#2193
officialasishkumar wants to merge 1 commit into
shipwright-io:mainfrom
officialasishkumar:fix/hermetic-unit-tests

Conversation

@officialasishkumar
Copy link
Copy Markdown
Contributor

Changes

  • Replace Git command execution and TCP checks in command/unit tests with package-local fakes.
  • Stub Trivy execution in vulnerability scan unit tests and image-processing command tests.
  • Use local test registries and listeners instead of public GitHub, GHCR, and network endpoints.

Related Issue

Fixes #1865

Type of PR

/kind bug

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Kind label has been set
  • Release notes block has been filled in, or marked NONE

Release Notes

None

Replace command and scanner dependencies in unit tests with package-local fakes, and use local test registries/listeners instead of public services.
@openshift-ci openshift-ci Bot added release-note-none Label for when a PR does not need a release note kind/bug Categorizes issue or PR as related to a bug. labels May 11, 2026
@pull-request-size pull-request-size Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 11, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 11, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign heavywombat for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. release-note-none Label for when a PR does not need a release note size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[BUG] Unit Tests Require External Binaries and Resources

2 participants