diff --git a/pkg/cmd/attestation/api/client_test.go b/pkg/cmd/attestation/api/client_test.go index 0e0827295..787408a4e 100644 --- a/pkg/cmd/attestation/api/client_test.go +++ b/pkg/cmd/attestation/api/client_test.go @@ -43,7 +43,6 @@ func NewClientWithMockGHClient(hasNextPage bool) Client { } func TestGetByDigest(t *testing.T) { - t.Skip() c := NewClientWithMockGHClient(false) attestations, err := c.GetByRepoAndDigest(testRepo, testDigest, DefaultLimit) require.NoError(t, err) @@ -61,7 +60,6 @@ func TestGetByDigest(t *testing.T) { } func TestGetByDigestGreaterThanLimit(t *testing.T) { - t.Skip() c := NewClientWithMockGHClient(false) limit := 3 @@ -82,7 +80,6 @@ func TestGetByDigestGreaterThanLimit(t *testing.T) { } func TestGetByDigestWithNextPage(t *testing.T) { - t.Skip() c := NewClientWithMockGHClient(true) attestations, err := c.GetByRepoAndDigest(testRepo, testDigest, DefaultLimit) require.NoError(t, err) @@ -100,7 +97,6 @@ func TestGetByDigestWithNextPage(t *testing.T) { } func TestGetByDigestGreaterThanLimitWithNextPage(t *testing.T) { - t.Skip() c := NewClientWithMockGHClient(true) limit := 7 @@ -121,7 +117,6 @@ func TestGetByDigestGreaterThanLimitWithNextPage(t *testing.T) { } func TestGetByDigest_NoAttestationsFound(t *testing.T) { - t.Skip() fetcher := mockDataGenerator{ NumAttestations: 5, } @@ -147,7 +142,6 @@ func TestGetByDigest_NoAttestationsFound(t *testing.T) { } func TestGetByDigest_Error(t *testing.T) { - t.Skip() fetcher := mockDataGenerator{ NumAttestations: 5, } @@ -169,7 +163,6 @@ func TestGetByDigest_Error(t *testing.T) { } func TestFetchBundleFromAttestations_BundleURL(t *testing.T) { - t.Skip() httpClient := &mockHttpClient{} client := LiveClient{ httpClient: httpClient, @@ -187,7 +180,6 @@ func TestFetchBundleFromAttestations_BundleURL(t *testing.T) { } func TestFetchBundleFromAttestations_MissingBundleAndBundleURLFields(t *testing.T) { - t.Skip() httpClient := &mockHttpClient{} client := LiveClient{ httpClient: httpClient, @@ -204,7 +196,6 @@ func TestFetchBundleFromAttestations_MissingBundleAndBundleURLFields(t *testing. } func TestFetchBundleFromAttestations_FailOnTheSecondAttestation(t *testing.T) { - t.Skip() mockHTTPClient := &failAfterNCallsHttpClient{ // the initial HTTP request will succeed, which returns a bundle for the first attestation // all following HTTP requests will fail, which means the function fails to fetch a bundle @@ -227,7 +218,6 @@ func TestFetchBundleFromAttestations_FailOnTheSecondAttestation(t *testing.T) { } func TestFetchBundleFromAttestations_FailAfterRetrying(t *testing.T) { - t.Skip() mockHTTPClient := &reqFailHttpClient{} c := &LiveClient{ @@ -244,7 +234,6 @@ func TestFetchBundleFromAttestations_FailAfterRetrying(t *testing.T) { } func TestFetchBundleFromAttestations_FallbackToBundleField(t *testing.T) { - t.Skip() mockHTTPClient := &mockHttpClient{} c := &LiveClient{ @@ -263,7 +252,6 @@ func TestFetchBundleFromAttestations_FallbackToBundleField(t *testing.T) { // getBundle successfully fetches a bundle on the first HTTP request attempt func TestGetBundle(t *testing.T) { - t.Skip() mockHTTPClient := &mockHttpClient{} c := &LiveClient{ @@ -280,7 +268,6 @@ func TestGetBundle(t *testing.T) { // getBundle retries successfully when the initial HTTP request returns // a 5XX status code func TestGetBundle_SuccessfulRetry(t *testing.T) { - t.Skip() mockHTTPClient := &failAfterNCallsHttpClient{ FailOnCallN: 1, FailOnAllSubsequentCalls: false, @@ -299,7 +286,6 @@ func TestGetBundle_SuccessfulRetry(t *testing.T) { // getBundle does not retry when the function fails with a permanent backoff error condition func TestGetBundle_PermanentBackoffFail(t *testing.T) { - t.Skip() mockHTTPClient := &invalidBundleClient{} c := &LiveClient{ httpClient: mockHTTPClient, @@ -316,7 +302,6 @@ func TestGetBundle_PermanentBackoffFail(t *testing.T) { // getBundle retries when the HTTP request fails func TestGetBundle_RequestFail(t *testing.T) { - t.Skip() mockHTTPClient := &reqFailHttpClient{} c := &LiveClient{ @@ -331,7 +316,6 @@ func TestGetBundle_RequestFail(t *testing.T) { } func TestGetTrustDomain(t *testing.T) { - t.Skip() fetcher := mockMetaGenerator{ TrustDomain: "foo", } @@ -364,7 +348,6 @@ func TestGetTrustDomain(t *testing.T) { } func TestGetAttestationsRetries(t *testing.T) { - t.Skip() getAttestationRetryInterval = 0 fetcher := mockDataGenerator{ @@ -405,7 +388,6 @@ func TestGetAttestationsRetries(t *testing.T) { // test total retries func TestGetAttestationsMaxRetries(t *testing.T) { - t.Skip() getAttestationRetryInterval = 0 fetcher := mockDataGenerator{ diff --git a/pkg/cmd/attestation/artifact/artifact_posix_test.go b/pkg/cmd/attestation/artifact/artifact_posix_test.go index 2fca69cbb..31e9cb7e7 100644 --- a/pkg/cmd/attestation/artifact/artifact_posix_test.go +++ b/pkg/cmd/attestation/artifact/artifact_posix_test.go @@ -10,7 +10,6 @@ import ( ) func TestNormalizeReference(t *testing.T) { - t.Skip() testCases := []struct { name string reference string diff --git a/pkg/cmd/attestation/artifact/artifact_windows_test.go b/pkg/cmd/attestation/artifact/artifact_windows_test.go index 4648be0a5..46995f226 100644 --- a/pkg/cmd/attestation/artifact/artifact_windows_test.go +++ b/pkg/cmd/attestation/artifact/artifact_windows_test.go @@ -10,7 +10,6 @@ import ( ) func TestNormalizeReference(t *testing.T) { - t.Skip() testCases := []struct { name string reference string diff --git a/pkg/cmd/attestation/artifact/digest/digest_test.go b/pkg/cmd/attestation/artifact/digest/digest_test.go index 2fb7727f5..bcfd2c1ac 100644 --- a/pkg/cmd/attestation/artifact/digest/digest_test.go +++ b/pkg/cmd/attestation/artifact/digest/digest_test.go @@ -9,7 +9,6 @@ import ( ) func TestArtifactDigestWithAlgorithm(t *testing.T) { - t.Skip() testString := "deadbeef" sha512TestDigest := "113a3bc783d851fc0373214b19ea7be9fa3de541ecb9fe026d52c603e8ea19c174cc0e9705f8b90d312212c0c3a6d8453ddfb3e3141409cf4bedc8ef033590b4" sha256TestDigest := "2baf1f40105d9501fe319a8ec463fdf4325a2a5df445adf3f572f626253678c9" @@ -37,7 +36,6 @@ func TestArtifactDigestWithAlgorithm(t *testing.T) { } func TestValidDigestAlgorithms(t *testing.T) { - t.Skip() t.Run("includes sha256", func(t *testing.T) { assert.Contains(t, ValidDigestAlgorithms(), "sha256") }) diff --git a/pkg/cmd/attestation/artifact/image_test.go b/pkg/cmd/attestation/artifact/image_test.go index ad0c1f406..5ea5f9a37 100644 --- a/pkg/cmd/attestation/artifact/image_test.go +++ b/pkg/cmd/attestation/artifact/image_test.go @@ -9,7 +9,6 @@ import ( ) func TestDigestContainerImageArtifact(t *testing.T) { - t.Skip() expectedDigest := "1234567890abcdef" client := oci.MockClient{} url := "example.com/repo:tag" @@ -21,7 +20,6 @@ func TestDigestContainerImageArtifact(t *testing.T) { } func TestParseImageRefFailure(t *testing.T) { - t.Skip() client := oci.ReferenceFailClient{} url := "example.com/repo:tag" _, err := digestContainerImageArtifact(url, client) @@ -29,7 +27,6 @@ func TestParseImageRefFailure(t *testing.T) { } func TestFetchImageFailure(t *testing.T) { - t.Skip() testcase := []struct { name string client oci.Client diff --git a/pkg/cmd/attestation/artifact/oci/client_test.go b/pkg/cmd/attestation/artifact/oci/client_test.go index 73cf9b42d..a46533366 100644 --- a/pkg/cmd/attestation/artifact/oci/client_test.go +++ b/pkg/cmd/attestation/artifact/oci/client_test.go @@ -13,7 +13,6 @@ import ( ) func TestGetImageDigest_Success(t *testing.T) { - t.Skip() expectedDigest := v1.Hash{ Hex: "1234567890abcdef", Algorithm: "sha256", @@ -38,7 +37,6 @@ func TestGetImageDigest_Success(t *testing.T) { } func TestGetImageDigest_ReferenceFail(t *testing.T) { - t.Skip() c := LiveClient{ parseReference: func(string, ...name.Option) (name.Reference, error) { return nil, fmt.Errorf("failed to parse reference") @@ -55,7 +53,6 @@ func TestGetImageDigest_ReferenceFail(t *testing.T) { } func TestGetImageDigest_AuthFail(t *testing.T) { - t.Skip() c := LiveClient{ parseReference: func(string, ...name.Option) (name.Reference, error) { return name.Tag{}, nil @@ -73,7 +70,6 @@ func TestGetImageDigest_AuthFail(t *testing.T) { } func TestGetImageDigest_Denied(t *testing.T) { - t.Skip() c := LiveClient{ parseReference: func(string, ...name.Option) (name.Reference, error) { return name.Tag{}, nil diff --git a/pkg/cmd/attestation/auth/host_test.go b/pkg/cmd/attestation/auth/host_test.go index 88f1da09b..5d905bd04 100644 --- a/pkg/cmd/attestation/auth/host_test.go +++ b/pkg/cmd/attestation/auth/host_test.go @@ -9,7 +9,6 @@ import ( ) func TestIsHostSupported(t *testing.T) { - t.Skip() testcases := []struct { name string expectedErr bool diff --git a/pkg/cmd/attestation/download/download_test.go b/pkg/cmd/attestation/download/download_test.go index 4bdfb4e25..ddcd08c92 100644 --- a/pkg/cmd/attestation/download/download_test.go +++ b/pkg/cmd/attestation/download/download_test.go @@ -35,7 +35,6 @@ func expectedFilePath(tempDir string, digestWithAlg string) string { } func TestNewDownloadCmd(t *testing.T) { - t.Skip() testIO, _, _, _ := iostreams.Test() f := &cmdutil.Factory{ IOStreams: testIO, @@ -191,7 +190,6 @@ func TestNewDownloadCmd(t *testing.T) { } func TestRunDownload(t *testing.T) { - t.Skip() tempDir := t.TempDir() store := &LiveStore{ outputPath: tempDir, diff --git a/pkg/cmd/attestation/download/metadata_test.go b/pkg/cmd/attestation/download/metadata_test.go index 6f9c868c8..2596e2377 100644 --- a/pkg/cmd/attestation/download/metadata_test.go +++ b/pkg/cmd/attestation/download/metadata_test.go @@ -28,7 +28,6 @@ func OnCreateMetadataFileFailure(artifactDigest string, attestationsResp []*api. } func TestCreateJSONLinesFilePath(t *testing.T) { - t.Skip() tempDir := t.TempDir() artifact, err := artifact.NewDigestedArtifact(oci.MockClient{}, "../test/data/sigstore-js-2.1.0.tgz", "sha512") require.NoError(t, err) diff --git a/pkg/cmd/attestation/download/options_test.go b/pkg/cmd/attestation/download/options_test.go index fa6814838..800691d79 100644 --- a/pkg/cmd/attestation/download/options_test.go +++ b/pkg/cmd/attestation/download/options_test.go @@ -8,7 +8,6 @@ import ( ) func TestAreFlagsValid(t *testing.T) { - t.Skip() tests := []struct { name string limit int diff --git a/pkg/cmd/attestation/inspect/bundle_test.go b/pkg/cmd/attestation/inspect/bundle_test.go index c37613831..61b8d7bfc 100644 --- a/pkg/cmd/attestation/inspect/bundle_test.go +++ b/pkg/cmd/attestation/inspect/bundle_test.go @@ -10,7 +10,6 @@ import ( ) func TestGetOrgAndRepo(t *testing.T) { - t.Skip() t.Run("with valid source URL", func(t *testing.T) { sourceURL := "https://github.com/github/gh-attestation" org, repo, err := getOrgAndRepo("", sourceURL) @@ -37,7 +36,6 @@ func TestGetOrgAndRepo(t *testing.T) { } func TestGetAttestationDetail(t *testing.T) { - t.Skip() bundlePath := test.NormalizeRelativePath("../test/data/sigstore-js-2.1.0-bundle.json") attestations, err := verification.GetLocalAttestations(bundlePath) diff --git a/pkg/cmd/attestation/inspect/inspect_test.go b/pkg/cmd/attestation/inspect/inspect_test.go index 0f9da0396..1e0c1305e 100644 --- a/pkg/cmd/attestation/inspect/inspect_test.go +++ b/pkg/cmd/attestation/inspect/inspect_test.go @@ -31,7 +31,6 @@ var ( ) func TestNewInspectCmd(t *testing.T) { - t.Skip() testIO, _, _, _ := iostreams.Test() f := &cmdutil.Factory{ IOStreams: testIO, @@ -89,7 +88,6 @@ func TestNewInspectCmd(t *testing.T) { } func TestRunInspect(t *testing.T) { - t.Skip() opts := Options{ BundlePath: bundlePath, Logger: io.NewTestHandler(), @@ -115,7 +113,6 @@ func TestRunInspect(t *testing.T) { } func TestJSONOutput(t *testing.T) { - t.Skip() testIO, _, out, _ := iostreams.Test() opts := Options{ BundlePath: bundlePath, diff --git a/pkg/cmd/attestation/trustedroot/trustedroot_test.go b/pkg/cmd/attestation/trustedroot/trustedroot_test.go index 5ad4e5131..c4a259436 100644 --- a/pkg/cmd/attestation/trustedroot/trustedroot_test.go +++ b/pkg/cmd/attestation/trustedroot/trustedroot_test.go @@ -22,7 +22,6 @@ import ( ) func TestNewTrustedRootCmd(t *testing.T) { - t.Skip() testIO, _, _, _ := iostreams.Test() f := &cmdutil.Factory{ IOStreams: testIO, @@ -83,7 +82,6 @@ func TestNewTrustedRootCmd(t *testing.T) { } func TestNewTrustedRootWithTenancy(t *testing.T) { - t.Skip() testIO, _, _, _ := iostreams.Test() var testReg httpmock.Registry var metaResp = api.MetaResponse{ @@ -165,7 +163,6 @@ var newTUFErrClient tufClientInstantiator = func(o *tuf.Options) (*tuf.Client, e } func TestGetTrustedRoot(t *testing.T) { - t.Skip() mirror := "https://tuf-repo.github.com" root := test.NormalizeRelativePath("../verification/embed/tuf-repo.github.com/root.json") diff --git a/pkg/cmd/attestation/verification/attestation_test.go b/pkg/cmd/attestation/verification/attestation_test.go index 166339bca..8acff0c37 100644 --- a/pkg/cmd/attestation/verification/attestation_test.go +++ b/pkg/cmd/attestation/verification/attestation_test.go @@ -14,7 +14,6 @@ import ( ) func TestLoadBundlesFromJSONLinesFile(t *testing.T) { - t.Skip() t.Run("with original file", func(t *testing.T) { path := "../test/data/sigstore-js-2.1.0_with_2_bundles.jsonl" attestations, err := loadBundlesFromJSONLinesFile(path) @@ -44,7 +43,6 @@ func TestLoadBundlesFromJSONLinesFile(t *testing.T) { } func TestLoadBundlesFromJSONLinesFile_RejectEmptyJSONLFile(t *testing.T) { - t.Skip() // Create a temporary file emptyJSONL, err := os.CreateTemp("", "empty.jsonl") require.NoError(t, err) @@ -58,7 +56,6 @@ func TestLoadBundlesFromJSONLinesFile_RejectEmptyJSONLFile(t *testing.T) { } func TestLoadBundleFromJSONFile(t *testing.T) { - t.Skip() path := "../test/data/sigstore-js-2.1.0-bundle.json" attestations, err := loadBundleFromJSONFile(path) @@ -67,7 +64,6 @@ func TestLoadBundleFromJSONFile(t *testing.T) { } func TestGetLocalAttestations(t *testing.T) { - t.Skip() t.Run("with JSON file containing one bundle", func(t *testing.T) { path := "../test/data/sigstore-js-2.1.0-bundle.json" attestations, err := GetLocalAttestations(path) @@ -122,7 +118,6 @@ func TestGetLocalAttestations(t *testing.T) { } func TestFilterAttestations(t *testing.T) { - t.Skip() attestations := []*api.Attestation{ { Bundle: &bundle.Bundle{ diff --git a/pkg/cmd/attestation/verification/extensions_test.go b/pkg/cmd/attestation/verification/extensions_test.go index 2e9ea1745..73d808119 100644 --- a/pkg/cmd/attestation/verification/extensions_test.go +++ b/pkg/cmd/attestation/verification/extensions_test.go @@ -25,7 +25,6 @@ func createSampleResult() *AttestationProcessingResult { } func TestVerifyCertExtensions(t *testing.T) { - t.Skip() results := []*AttestationProcessingResult{createSampleResult()} certSummary := certificate.Summary{} diff --git a/pkg/cmd/attestation/verification/tuf_test.go b/pkg/cmd/attestation/verification/tuf_test.go index dc2b36bb6..e8b6ecf98 100644 --- a/pkg/cmd/attestation/verification/tuf_test.go +++ b/pkg/cmd/attestation/verification/tuf_test.go @@ -11,7 +11,6 @@ import ( ) func TestGitHubTUFOptionsNoMetadataDir(t *testing.T) { - t.Skip() os.Setenv("CODESPACES", "true") opts := GitHubTUFOptions(o.None[string]()) diff --git a/pkg/cmd/attestation/verify/options_test.go b/pkg/cmd/attestation/verify/options_test.go index 3f5a79065..bdb851e7b 100644 --- a/pkg/cmd/attestation/verify/options_test.go +++ b/pkg/cmd/attestation/verify/options_test.go @@ -23,7 +23,6 @@ var baseOptions = Options{ } func TestAreFlagsValid(t *testing.T) { - t.Skip() t.Run("has invalid Repo value", func(t *testing.T) { opts := baseOptions opts.Repo = "sigstoresigstore-js" diff --git a/pkg/cmd/attestation/verify/policy_test.go b/pkg/cmd/attestation/verify/policy_test.go index 719119083..ff10cad11 100644 --- a/pkg/cmd/attestation/verify/policy_test.go +++ b/pkg/cmd/attestation/verify/policy_test.go @@ -9,7 +9,6 @@ import ( ) func TestNewEnforcementCriteria(t *testing.T) { - t.Skip() artifactPath := "../test/data/sigstore-js-2.1.0.tgz" t.Run("sets SANRegex and SAN using SANRegex and SAN", func(t *testing.T) { diff --git a/pkg/cmd/attestation/verify/verify_integration_test.go b/pkg/cmd/attestation/verify/verify_integration_test.go index e6bdd1cc8..92864f78e 100644 --- a/pkg/cmd/attestation/verify/verify_integration_test.go +++ b/pkg/cmd/attestation/verify/verify_integration_test.go @@ -17,7 +17,6 @@ import ( ) func TestVerifyIntegration(t *testing.T) { - t.Skip() logger := io.NewTestHandler() sigstoreConfig := verification.SigstoreConfig{ @@ -131,7 +130,6 @@ func TestVerifyIntegration(t *testing.T) { } func TestVerifyIntegrationCustomIssuer(t *testing.T) { - t.Skip() artifactPath := test.NormalizeRelativePath("../test/data/custom-issuer-artifact") bundlePath := test.NormalizeRelativePath("../test/data/custom-issuer.sigstore.json") @@ -205,7 +203,6 @@ func TestVerifyIntegrationCustomIssuer(t *testing.T) { } func TestVerifyIntegrationReusableWorkflow(t *testing.T) { - t.Skip() artifactPath := test.NormalizeRelativePath("../test/data/reusable-workflow-artifact") bundlePath := test.NormalizeRelativePath("../test/data/reusable-workflow-attestation.sigstore.json") @@ -298,7 +295,6 @@ func TestVerifyIntegrationReusableWorkflow(t *testing.T) { } func TestVerifyIntegrationReusableWorkflowSignerWorkflow(t *testing.T) { - t.Skip() artifactPath := test.NormalizeRelativePath("../test/data/reusable-workflow-artifact") bundlePath := test.NormalizeRelativePath("../test/data/reusable-workflow-attestation.sigstore.json") diff --git a/pkg/cmd/attestation/verify/verify_test.go b/pkg/cmd/attestation/verify/verify_test.go index 40635c220..092a009d8 100644 --- a/pkg/cmd/attestation/verify/verify_test.go +++ b/pkg/cmd/attestation/verify/verify_test.go @@ -34,7 +34,6 @@ var ( ) func TestNewVerifyCmd(t *testing.T) { - t.Skip() testIO, _, _, _ := iostreams.Test() var testReg httpmock.Registry var metaResp = api.MetaResponse{ @@ -316,7 +315,6 @@ func TestNewVerifyCmd(t *testing.T) { } func TestVerifyCmdAuthChecks(t *testing.T) { - t.Skip() f := &cmdutil.Factory{} t.Run("by default auth check is required", func(t *testing.T) { @@ -347,7 +345,6 @@ func TestVerifyCmdAuthChecks(t *testing.T) { } func TestJSONOutput(t *testing.T) { - t.Skip() testIO, _, out, _ := iostreams.Test() opts := Options{ ArtifactPath: artifactPath, @@ -371,7 +368,6 @@ func TestJSONOutput(t *testing.T) { } func TestRunVerify(t *testing.T) { - t.Skip() logger := io.NewTestHandler() publicGoodOpts := Options{