temporarily skip non-failing tests
Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
parent
29080dc70a
commit
de8778797f
20 changed files with 59 additions and 0 deletions
|
|
@ -43,6 +43,7 @@ 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)
|
||||
|
|
@ -60,6 +61,7 @@ func TestGetByDigest(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetByDigestGreaterThanLimit(t *testing.T) {
|
||||
t.Skip()
|
||||
c := NewClientWithMockGHClient(false)
|
||||
|
||||
limit := 3
|
||||
|
|
@ -80,6 +82,7 @@ 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)
|
||||
|
|
@ -97,6 +100,7 @@ func TestGetByDigestWithNextPage(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetByDigestGreaterThanLimitWithNextPage(t *testing.T) {
|
||||
t.Skip()
|
||||
c := NewClientWithMockGHClient(true)
|
||||
|
||||
limit := 7
|
||||
|
|
@ -117,6 +121,7 @@ func TestGetByDigestGreaterThanLimitWithNextPage(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetByDigest_NoAttestationsFound(t *testing.T) {
|
||||
t.Skip()
|
||||
fetcher := mockDataGenerator{
|
||||
NumAttestations: 5,
|
||||
}
|
||||
|
|
@ -142,6 +147,7 @@ func TestGetByDigest_NoAttestationsFound(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetByDigest_Error(t *testing.T) {
|
||||
t.Skip()
|
||||
fetcher := mockDataGenerator{
|
||||
NumAttestations: 5,
|
||||
}
|
||||
|
|
@ -163,6 +169,7 @@ func TestGetByDigest_Error(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFetchBundleFromAttestations_BundleURL(t *testing.T) {
|
||||
t.Skip()
|
||||
httpClient := &mockHttpClient{}
|
||||
client := LiveClient{
|
||||
httpClient: httpClient,
|
||||
|
|
@ -180,6 +187,7 @@ func TestFetchBundleFromAttestations_BundleURL(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFetchBundleFromAttestations_MissingBundleAndBundleURLFields(t *testing.T) {
|
||||
t.Skip()
|
||||
httpClient := &mockHttpClient{}
|
||||
client := LiveClient{
|
||||
httpClient: httpClient,
|
||||
|
|
@ -196,6 +204,7 @@ 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
|
||||
|
|
@ -218,6 +227,7 @@ func TestFetchBundleFromAttestations_FailOnTheSecondAttestation(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFetchBundleFromAttestations_FailAfterRetrying(t *testing.T) {
|
||||
t.Skip()
|
||||
mockHTTPClient := &reqFailHttpClient{}
|
||||
|
||||
c := &LiveClient{
|
||||
|
|
@ -234,6 +244,7 @@ func TestFetchBundleFromAttestations_FailAfterRetrying(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFetchBundleFromAttestations_FallbackToBundleField(t *testing.T) {
|
||||
t.Skip()
|
||||
mockHTTPClient := &mockHttpClient{}
|
||||
|
||||
c := &LiveClient{
|
||||
|
|
@ -252,6 +263,7 @@ 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{
|
||||
|
|
@ -268,6 +280,7 @@ 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,
|
||||
|
|
@ -286,6 +299,7 @@ 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,
|
||||
|
|
@ -302,6 +316,7 @@ 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{
|
||||
|
|
@ -316,6 +331,7 @@ func TestGetBundle_RequestFail(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetTrustDomain(t *testing.T) {
|
||||
t.Skip()
|
||||
fetcher := mockMetaGenerator{
|
||||
TrustDomain: "foo",
|
||||
}
|
||||
|
|
@ -348,6 +364,7 @@ func TestGetTrustDomain(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetAttestationsRetries(t *testing.T) {
|
||||
t.Skip()
|
||||
getAttestationRetryInterval = 0
|
||||
|
||||
fetcher := mockDataGenerator{
|
||||
|
|
@ -388,6 +405,7 @@ func TestGetAttestationsRetries(t *testing.T) {
|
|||
|
||||
// test total retries
|
||||
func TestGetAttestationsMaxRetries(t *testing.T) {
|
||||
t.Skip()
|
||||
getAttestationRetryInterval = 0
|
||||
|
||||
fetcher := mockDataGenerator{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
)
|
||||
|
||||
func TestNormalizeReference(t *testing.T) {
|
||||
t.Skip()
|
||||
testCases := []struct {
|
||||
name string
|
||||
reference string
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
)
|
||||
|
||||
func TestNormalizeReference(t *testing.T) {
|
||||
t.Skip()
|
||||
testCases := []struct {
|
||||
name string
|
||||
reference string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func TestArtifactDigestWithAlgorithm(t *testing.T) {
|
||||
t.Skip()
|
||||
testString := "deadbeef"
|
||||
sha512TestDigest := "113a3bc783d851fc0373214b19ea7be9fa3de541ecb9fe026d52c603e8ea19c174cc0e9705f8b90d312212c0c3a6d8453ddfb3e3141409cf4bedc8ef033590b4"
|
||||
sha256TestDigest := "2baf1f40105d9501fe319a8ec463fdf4325a2a5df445adf3f572f626253678c9"
|
||||
|
|
@ -36,6 +37,7 @@ 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,6 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func TestDigestContainerImageArtifact(t *testing.T) {
|
||||
t.Skip()
|
||||
expectedDigest := "1234567890abcdef"
|
||||
client := oci.MockClient{}
|
||||
url := "example.com/repo:tag"
|
||||
|
|
@ -20,6 +21,7 @@ func TestDigestContainerImageArtifact(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestParseImageRefFailure(t *testing.T) {
|
||||
t.Skip()
|
||||
client := oci.ReferenceFailClient{}
|
||||
url := "example.com/repo:tag"
|
||||
_, err := digestContainerImageArtifact(url, client)
|
||||
|
|
@ -27,6 +29,7 @@ func TestParseImageRefFailure(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFetchImageFailure(t *testing.T) {
|
||||
t.Skip()
|
||||
testcase := []struct {
|
||||
name string
|
||||
client oci.Client
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import (
|
|||
)
|
||||
|
||||
func TestGetImageDigest_Success(t *testing.T) {
|
||||
t.Skip()
|
||||
expectedDigest := v1.Hash{
|
||||
Hex: "1234567890abcdef",
|
||||
Algorithm: "sha256",
|
||||
|
|
@ -37,6 +38,7 @@ 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")
|
||||
|
|
@ -53,6 +55,7 @@ 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
|
||||
|
|
@ -70,6 +73,7 @@ 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,6 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func TestIsHostSupported(t *testing.T) {
|
||||
t.Skip()
|
||||
testcases := []struct {
|
||||
name string
|
||||
expectedErr bool
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ func expectedFilePath(tempDir string, digestWithAlg string) string {
|
|||
}
|
||||
|
||||
func TestNewDownloadCmd(t *testing.T) {
|
||||
t.Skip()
|
||||
testIO, _, _, _ := iostreams.Test()
|
||||
f := &cmdutil.Factory{
|
||||
IOStreams: testIO,
|
||||
|
|
@ -190,6 +191,7 @@ func TestNewDownloadCmd(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRunDownload(t *testing.T) {
|
||||
t.Skip()
|
||||
tempDir := t.TempDir()
|
||||
store := &LiveStore{
|
||||
outputPath: tempDir,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ 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,6 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func TestAreFlagsValid(t *testing.T) {
|
||||
t.Skip()
|
||||
tests := []struct {
|
||||
name string
|
||||
limit int
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ 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)
|
||||
|
|
@ -36,6 +37,7 @@ 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,6 +31,7 @@ var (
|
|||
)
|
||||
|
||||
func TestNewInspectCmd(t *testing.T) {
|
||||
t.Skip()
|
||||
testIO, _, _, _ := iostreams.Test()
|
||||
f := &cmdutil.Factory{
|
||||
IOStreams: testIO,
|
||||
|
|
@ -88,6 +89,7 @@ func TestNewInspectCmd(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRunInspect(t *testing.T) {
|
||||
t.Skip()
|
||||
opts := Options{
|
||||
BundlePath: bundlePath,
|
||||
Logger: io.NewTestHandler(),
|
||||
|
|
@ -113,6 +115,7 @@ func TestRunInspect(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestJSONOutput(t *testing.T) {
|
||||
t.Skip()
|
||||
testIO, _, out, _ := iostreams.Test()
|
||||
opts := Options{
|
||||
BundlePath: bundlePath,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import (
|
|||
)
|
||||
|
||||
func TestNewTrustedRootCmd(t *testing.T) {
|
||||
t.Skip()
|
||||
testIO, _, _, _ := iostreams.Test()
|
||||
f := &cmdutil.Factory{
|
||||
IOStreams: testIO,
|
||||
|
|
@ -82,6 +83,7 @@ func TestNewTrustedRootCmd(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestNewTrustedRootWithTenancy(t *testing.T) {
|
||||
t.Skip()
|
||||
testIO, _, _, _ := iostreams.Test()
|
||||
var testReg httpmock.Registry
|
||||
var metaResp = api.MetaResponse{
|
||||
|
|
@ -163,6 +165,7 @@ 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,6 +14,7 @@ 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)
|
||||
|
|
@ -43,6 +44,7 @@ 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)
|
||||
|
|
@ -56,6 +58,7 @@ 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)
|
||||
|
||||
|
|
@ -64,6 +67,7 @@ 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)
|
||||
|
|
@ -118,6 +122,7 @@ func TestGetLocalAttestations(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFilterAttestations(t *testing.T) {
|
||||
t.Skip()
|
||||
attestations := []*api.Attestation{
|
||||
{
|
||||
Bundle: &bundle.Bundle{
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ func createSampleResult() *AttestationProcessingResult {
|
|||
}
|
||||
|
||||
func TestVerifyCertExtensions(t *testing.T) {
|
||||
t.Skip()
|
||||
results := []*AttestationProcessingResult{createSampleResult()}
|
||||
|
||||
certSummary := certificate.Summary{}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
)
|
||||
|
||||
func TestGitHubTUFOptionsNoMetadataDir(t *testing.T) {
|
||||
t.Skip()
|
||||
os.Setenv("CODESPACES", "true")
|
||||
opts := GitHubTUFOptions(o.None[string]())
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ 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,6 +9,7 @@ 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,6 +17,7 @@ import (
|
|||
)
|
||||
|
||||
func TestVerifyIntegration(t *testing.T) {
|
||||
t.Skip()
|
||||
logger := io.NewTestHandler()
|
||||
|
||||
sigstoreConfig := verification.SigstoreConfig{
|
||||
|
|
@ -130,6 +131,7 @@ 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")
|
||||
|
||||
|
|
@ -203,6 +205,7 @@ 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")
|
||||
|
||||
|
|
@ -295,6 +298,7 @@ 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,6 +34,7 @@ var (
|
|||
)
|
||||
|
||||
func TestNewVerifyCmd(t *testing.T) {
|
||||
t.Skip()
|
||||
testIO, _, _, _ := iostreams.Test()
|
||||
var testReg httpmock.Registry
|
||||
var metaResp = api.MetaResponse{
|
||||
|
|
@ -315,6 +316,7 @@ 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) {
|
||||
|
|
@ -345,6 +347,7 @@ func TestVerifyCmdAuthChecks(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestJSONOutput(t *testing.T) {
|
||||
t.Skip()
|
||||
testIO, _, out, _ := iostreams.Test()
|
||||
opts := Options{
|
||||
ArtifactPath: artifactPath,
|
||||
|
|
@ -368,6 +371,7 @@ 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