Skip to content

Skip OCI registry tests when Docker is unavailable#7009

Open
rootp1 wants to merge 1 commit into
pipe-cd:masterfrom
rootp1:fix/oci-tests-skip-no-docker
Open

Skip OCI registry tests when Docker is unavailable#7009
rootp1 wants to merge 1 commit into
pipe-cd:masterfrom
rootp1:fix/oci-tests-skip-no-docker

Conversation

@rootp1

@rootp1 rootp1 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • skip Docker-dependent pkg/oci tests cleanly when the Docker daemon is unavailable instead of aborting the whole package in TestMain
  • add focused coverage for the Docker-unavailable detection logic

Linked Issue

Fixes #7008

What Changed

  • changed the OCI test harness to record registry setup failures and let Docker-dependent tests skip individually when Docker is unavailable
  • updated the Docker-backed OCI tests to use a shared requireOCIRegistry helper
  • added unit coverage for Docker-unavailable error classification

Verification

  • go test ./pkg/oci — passed
  • go test -v ./pkg/oci — passed
  • go test ./pkg/... ./cmd/... — failed: unrelated envtest prerequisite missing (/usr/local/kubebuilder/bin/etcd not found in pkg/app/piped/executor/kubernetes)
  • make check — failed: yarn is not installed, so the required web build step could not run
  • make lint/go MODULES=. — failed: docker is not installed, so the lint container could not start
  • make check/dco — failed: the script checks commits since origin/master and stops on upstream commit 25ae69937e55e8330bff96c34346718f3e5e7148, which already lacks a sign-off in this local range
  • git diff --check — passed

Scope

  • only pkg/oci test files were changed; unrelated tracked files were not modified

What this PR does:

Skips Docker-dependent OCI registry tests cleanly when Docker is unavailable and keeps genuine setup failures visible.

Why we need it:

Plain Go test runs should not abort on machines that do not have a Docker daemon available.

Which issue(s) this PR fixes:

Fixes #7008

Does this PR introduce a user-facing change?:

  • How are users affected by this change: contributor and CI test runs no longer hard-fail in pkg/oci solely because Docker is unavailable
  • Is this breaking change: no
  • How to migrate (if breaking change): not applicable

Signed-off-by: rootp1 <arnav.iitr@gmail.com>
@rootp1
rootp1 requested a review from a team as a code owner July 10, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg/oci tests abort when Docker is unavailable

1 participant