Skip to content

[BUG] Unit Tests Require External Binaries and Resources #1865

Open
@adambkaplan

Description

@adambkaplan

Is there an existing issue for this?

  • I have searched the existing issues

Kubernetes Version

N/A

Shipwright Version

v0.15

Current Behavior

The current unit tests - executed by make test - make external network requests and/or require external binaries. I have found two test suites that are "guilty" of this behavior:

  1. Our git clone test suite.
  2. Our test suite for vulnerability scanning with trivy.

Expected Behavior

Unit tests should be bound to just the code itself, invoking mock interface implementations if specific behavior needs to be checked. Tests that require network requests and/or external binaries should be moved to the integration or e2e test suite.

Steps To Reproduce

  1. Run make test without Trivy installed locally
  2. Run make test without SSH keys that are valid for git clone.

Anything else?

Potentially related to #1451

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions