Skip to content

Commit 4f28a95

Browse files
fix: no parallel regression tests (#855)
Make the regression tests that do online access not run in parallel. Besides VSA tests, all regression tests do some kind of online access of either TUF or Rekor. Signed-off-by: Ramon Petgrave <[email protected]>
1 parent 1595a06 commit 4f28a95

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

cli/slsa-verifier/main_regression_test.go

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,8 @@ func Test_runVerifyGHAArtifactPath(t *testing.T) {
692692
}
693693

694694
func Test_runVerifyGHAArtifactImage(t *testing.T) {
695-
t.Parallel()
695+
// Avoid rate limiting by not running the tests in parallel.
696+
// t.Parallel()
696697

697698
// Override cosign image verification function for local image testing.
698699
container.RunCosignImageVerification = func(ctx context.Context,
@@ -824,7 +825,8 @@ func Test_runVerifyGHAArtifactImage(t *testing.T) {
824825
}
825826
for _, tt := range tests {
826827
t.Run(tt.name, func(t *testing.T) {
827-
t.Parallel()
828+
// Avoid rate limiting by not running the tests in parallel.
829+
// t.Parallel()
828830

829831
checkVersions := getBuildersAndVersions(t, "", nil, GHA_ARTIFACT_IMAGE_BUILDERS)
830832
if tt.noversion {
@@ -924,7 +926,8 @@ func localDigestCompute(image string) (string, error) {
924926
}
925927

926928
func Test_runVerifyGCBArtifactImage(t *testing.T) {
927-
t.Parallel()
929+
// Avoid rate limiting by not running the tests in parallel.
930+
// t.Parallel()
928931
builder := "https://cloudbuild.googleapis.com/GoogleHostedWorker"
929932
tests := []struct {
930933
name string
@@ -1285,7 +1288,8 @@ func Test_runVerifyGCBArtifactImage(t *testing.T) {
12851288
}
12861289
for _, tt := range tests {
12871290
t.Run(tt.name, func(t *testing.T) {
1288-
t.Parallel()
1291+
// Avoid rate limiting by not running the tests in parallel.
1292+
// t.Parallel()
12891293

12901294
checkVersions := getBuildersAndVersions(t, tt.minversion, nil, GCB_ARTIFACT_IMAGE_BUILDERS)
12911295
if tt.noversion {
@@ -1376,7 +1380,8 @@ func Test_runVerifyGCBArtifactImage(t *testing.T) {
13761380
}
13771381

13781382
func Test_runVerifyGHAContainerBased(t *testing.T) {
1379-
t.Parallel()
1383+
// Avoid rate limiting by not running the tests in parallel.
1384+
// t.Parallel()
13801385

13811386
tests := []struct {
13821387
name string
@@ -1513,7 +1518,8 @@ func Test_runVerifyGHAContainerBased(t *testing.T) {
15131518
}
15141519

15151520
func Test_runVerifyGithubAttestation(t *testing.T) {
1516-
t.Parallel()
1521+
// Avoid rate limiting by not running the tests in parallel.
1522+
// t.Parallel()
15171523
os.Setenv("SLSA_VERIFIER_EXPERIMENTAL", "1")
15181524

15191525
bcrReleaserBuilderID := "https://github.com/bazel-contrib/.github/.github/workflows/release_ruleset.yaml"
@@ -1561,7 +1567,8 @@ func Test_runVerifyGithubAttestation(t *testing.T) {
15611567

15621568
for _, tt := range tests {
15631569
t.Run(tt.name, func(t *testing.T) {
1564-
t.Parallel()
1570+
// Avoid rate limiting by not running the tests in parallel.
1571+
// t.Parallel()
15651572

15661573
artifactPath := filepath.Clean(filepath.Join(TEST_DIR, "bcr", tt.artifact))
15671574
// we treat these single entry *.intoto.jsonl bundles as single attestations
@@ -1584,7 +1591,8 @@ func Test_runVerifyGithubAttestation(t *testing.T) {
15841591
func Test_runVerifyNpmPackage(t *testing.T) {
15851592
// We cannot use t.Setenv due to parallelized tests.
15861593
os.Setenv("SLSA_VERIFIER_EXPERIMENTAL", "1")
1587-
t.Parallel()
1594+
// Avoid rate limiting by not running the tests in parallel.
1595+
// t.Parallel()
15881596

15891597
tests := []struct {
15901598
name string
@@ -2044,7 +2052,8 @@ func Test_runVerifyNpmPackage(t *testing.T) {
20442052
}
20452053
for _, tt := range tests {
20462054
t.Run(tt.name, func(t *testing.T) {
2047-
t.Parallel()
2055+
// Avoid rate limiting by not running the tests in parallel.
2056+
// t.Parallel()
20482057

20492058
artifactPath := filepath.Clean(filepath.Join(TEST_DIR, "npm", "gha", tt.artifact))
20502059
attestationsPath := fmt.Sprintf("%s.json", artifactPath)

0 commit comments

Comments
 (0)