Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 temporarily disable failing e2e tests #3130

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 72 additions & 70 deletions e2e/attestor_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,76 +111,78 @@ var _ = Describe("E2E TEST PAT: scorecard-attestor policy", func() {
},
expected: policy.Pass,
},
{
name: "test repo with simple code review requirements",
repoURL: "https://github.com/ossf/scorecard",
commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
policy: policy.AttestationPolicy{
EnsureCodeReviewed: true,
CodeReviewRequirements: policy.CodeReviewRequirements{
MinReviewers: 1,
},
},
expected: policy.Pass,
},
{
name: "test code reviews required but repo doesn't have code reviews",
repoURL: "https://github.com/ossf-tests/scorecard-binauthz-test-bad",
policy: policy.AttestationPolicy{
PreventBinaryArtifacts: true,
PreventKnownVulnerabilities: true,
PreventUnpinnedDependencies: true,
EnsureCodeReviewed: true,
},
expected: policy.Fail,
},
{
name: "test code reviews required with min reviewers",
repoURL: "https://github.com/ossf/scorecard",
commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
policy: policy.AttestationPolicy{
PreventBinaryArtifacts: true,
PreventKnownVulnerabilities: false,
PreventUnpinnedDependencies: true,
EnsureCodeReviewed: true,
CodeReviewRequirements: policy.CodeReviewRequirements{
MinReviewers: 1,
},
},
expected: policy.Pass,
},
{
name: "test code reviews required with min reviewers and required reviewers",
repoURL: "https://github.com/ossf/scorecard",
commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
policy: policy.AttestationPolicy{
PreventBinaryArtifacts: true,
PreventKnownVulnerabilities: false,
PreventUnpinnedDependencies: true,
EnsureCodeReviewed: true,
CodeReviewRequirements: policy.CodeReviewRequirements{
MinReviewers: 1,
RequiredApprovers: []string{"spencerschrock", "laurentsimon", "naveensrinivasan", "azeemshaikh38"},
},
},
expected: policy.Pass,
},
{
name: "test code reviews required with too many min reviewers but matching required reviewers",
repoURL: "https://github.com/ossf/scorecard",
commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
policy: policy.AttestationPolicy{
PreventBinaryArtifacts: true,
PreventKnownVulnerabilities: false,
PreventUnpinnedDependencies: true,
EnsureCodeReviewed: true,
CodeReviewRequirements: policy.CodeReviewRequirements{
MinReviewers: 2,
RequiredApprovers: []string{"spencerschrock", "laurentsimon", "naveensrinivasan", "azeemshaikh38"},
},
},
expected: policy.Fail,
},
// TODO(https://github.com/ossf/scorecard/issues/3129) temporarily skipping code review tests
//
// {
// name: "test repo with simple code review requirements",
// repoURL: "https://github.com/ossf/scorecard",
// commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
// policy: policy.AttestationPolicy{
// EnsureCodeReviewed: true,
// CodeReviewRequirements: policy.CodeReviewRequirements{
// MinReviewers: 1,
// },
// },
// expected: policy.Pass,
// },
// {
// name: "test code reviews required but repo doesn't have code reviews",
// repoURL: "https://github.com/ossf-tests/scorecard-binauthz-test-bad",
// policy: policy.AttestationPolicy{
// PreventBinaryArtifacts: true,
// PreventKnownVulnerabilities: true,
// PreventUnpinnedDependencies: true,
// EnsureCodeReviewed: true,
// },
// expected: policy.Fail,
// },
// {
// name: "test code reviews required with min reviewers",
// repoURL: "https://github.com/ossf/scorecard",
// commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
// policy: policy.AttestationPolicy{
// PreventBinaryArtifacts: true,
// PreventKnownVulnerabilities: false,
// PreventUnpinnedDependencies: true,
// EnsureCodeReviewed: true,
// CodeReviewRequirements: policy.CodeReviewRequirements{
// MinReviewers: 1,
// },
// },
// expected: policy.Pass,
// },
// {
// name: "test code reviews required with min reviewers and required reviewers",
// repoURL: "https://github.com/ossf/scorecard",
// commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
// policy: policy.AttestationPolicy{
// PreventBinaryArtifacts: true,
// PreventKnownVulnerabilities: false,
// PreventUnpinnedDependencies: true,
// EnsureCodeReviewed: true,
// CodeReviewRequirements: policy.CodeReviewRequirements{
// MinReviewers: 1,
// RequiredApprovers: []string{"spencerschrock", "laurentsimon", "naveensrinivasan", "azeemshaikh38"},
// },
// },
// expected: policy.Pass,
// },
// {
// name: "test code reviews required with too many min reviewers but matching required reviewers",
// repoURL: "https://github.com/ossf/scorecard",
// commit: "fa0592fab28aa92560f04e1ae8649dfff566ae2b",
// policy: policy.AttestationPolicy{
// PreventBinaryArtifacts: true,
// PreventKnownVulnerabilities: false,
// PreventUnpinnedDependencies: true,
// EnsureCodeReviewed: true,
// CodeReviewRequirements: policy.CodeReviewRequirements{
// MinReviewers: 2,
// RequiredApprovers: []string{"spencerschrock", "laurentsimon", "naveensrinivasan", "azeemshaikh38"},
// },
// },
// expected: policy.Fail,
// },
}

for _, tc := range tt {
Expand Down
1 change: 1 addition & 0 deletions e2e/ci_tests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ var _ = Describe("E2E TEST:"+checks.CheckCITests, func() {
Expect(repoClient.Close()).Should(BeNil())
})
It("Should return absence of CI tests in a repo with unsquashed merges", func() {
Skip("TODO(https://github.com/ossf/scorecard/issues/3129) temporarily skipping")
dl := scut.TestDetailLogger{}
repo, err := githubrepo.MakeGithubRepo("duo-labs/parliament")
Expect(err).Should(BeNil())
Expand Down