Skip to content

Add missing //go:build integration tag to verify_integration_test.go#13303

Merged
williammartin merged 1 commit into
cli:trunkfrom
pdostal:fix/add-integration-build-tag
Apr 28, 2026
Merged

Add missing //go:build integration tag to verify_integration_test.go#13303
williammartin merged 1 commit into
cli:trunkfrom
pdostal:fix/add-integration-build-tag

Conversation

@pdostal

@pdostal pdostal commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the //go:build integration build tag to pkg/cmd/attestation/verify/verify_integration_test.go, which was the only integration test file in the attestation package missing this tag.

Problem

The four tests in verify_integration_test.go (TestVerifyIntegration, TestVerifyIntegrationCustomIssuer, TestVerifyIntegrationReusableWorkflow, TestVerifyIntegrationReusableWorkflowSignerWorkflow) call verification.NewLiveSigstoreVerifier() which requires network access to Sigstore and GitHub TUF servers to initialize trusted roots.

Unlike the other integration test files in the same package (attestation_integration_test.go, sigstore_integration_test.go, inspect_integration_test.go), this file was missing the //go:build integration tag. This caused these tests to run during a regular go test ./... and fail with no valid Sigstore verifiers could be initialized in network-isolated build environments (e.g. openSUSE package builds).

Fix

Add //go:build integration as the first line, matching the convention used by all other integration test files. These tests will continue to run in CI where -tags=integration is passed explicitly (see .github/workflows/go.yml).

The four tests in this file (TestVerifyIntegration,
TestVerifyIntegrationCustomIssuer, TestVerifyIntegrationReusableWorkflow,
TestVerifyIntegrationReusableWorkflowSignerWorkflow) call
NewLiveSigstoreVerifier which requires network access to Sigstore and
GitHub TUF servers. Unlike the other integration test files in this
package (attestation_integration_test.go, sigstore_integration_test.go,
inspect_integration_test.go), this file was missing the //go:build
integration tag, causing these tests to run during a regular
'go test ./...' and fail in network-isolated build environments.
@pdostal pdostal requested a review from a team as a code owner April 28, 2026 16:20
Copilot AI review requested due to automatic review settings April 28, 2026 16:20
@pdostal pdostal requested a review from a team as a code owner April 28, 2026 16:20
@pdostal pdostal requested a review from williammartin April 28, 2026 16:20
@github-actions github-actions Bot added unmet-requirements external pull request originating outside of the CLI core team needs-triage needs to be reviewed labels Apr 28, 2026
@github-actions

Copy link
Copy Markdown

Thanks for your pull request! Unfortunately, it doesn't meet the minimum requirements for review:

  • No linked help wanted issue found in PR description

Please update your PR to address the above. Requirements:

  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123 if it resolves the issue)

This PR will be automatically closed in 7 days if these requirements are not met.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds the missing Go integration build tag to ensure Sigstore/GitHub-network-dependent tests in the attestation verify package only run when -tags=integration is explicitly enabled.

Changes:

  • Add //go:build integration at the top of verify_integration_test.go to prevent unintended execution during go test ./... in network-isolated environments.

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

@williammartin

Copy link
Copy Markdown
Member

No need for an issue.

@williammartin williammartin merged commit fae293f into cli:trunk Apr 28, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants