Revert "temporarily skip non-failing tests"
This reverts commit de8778797f.
This commit is contained in:
parent
de8778797f
commit
139e82c68c
20 changed files with 0 additions and 59 deletions
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
)
|
||||
|
||||
func TestNormalizeReference(t *testing.T) {
|
||||
t.Skip()
|
||||
testCases := []struct {
|
||||
name string
|
||||
reference string
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
)
|
||||
|
||||
func TestNormalizeReference(t *testing.T) {
|
||||
t.Skip()
|
||||
testCases := []struct {
|
||||
name string
|
||||
reference string
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import (
|
|||
)
|
||||
|
||||
func TestIsHostSupported(t *testing.T) {
|
||||
t.Skip()
|
||||
testcases := []struct {
|
||||
name string
|
||||
expectedErr bool
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import (
|
|||
)
|
||||
|
||||
func TestAreFlagsValid(t *testing.T) {
|
||||
t.Skip()
|
||||
tests := []struct {
|
||||
name string
|
||||
limit int
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ func createSampleResult() *AttestationProcessingResult {
|
|||
}
|
||||
|
||||
func TestVerifyCertExtensions(t *testing.T) {
|
||||
t.Skip()
|
||||
results := []*AttestationProcessingResult{createSampleResult()}
|
||||
|
||||
certSummary := certificate.Summary{}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import (
|
|||
)
|
||||
|
||||
func TestGitHubTUFOptionsNoMetadataDir(t *testing.T) {
|
||||
t.Skip()
|
||||
os.Setenv("CODESPACES", "true")
|
||||
opts := GitHubTUFOptions(o.None[string]())
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue