-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes - Incorrect result for branch protection
- Loading branch information
1 parent
2a1463b
commit 93373f7
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package e2e | ||
|
||
import ( | ||
"context" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
"github.com/ossf/scorecard/checker" | ||
"github.com/ossf/scorecard/checks" | ||
) | ||
|
||
var _ = Describe("E2E TEST:Branch Protection", func() { | ||
Context("E2E TEST:Validating branch protection", func() { | ||
It("Should fail to return branch protection on other respositories", func() { | ||
l := log{} | ||
checker := checker.Checker{ | ||
Ctx: context.Background(), | ||
Client: ghClient, | ||
HttpClient: client, | ||
Owner: "apache", | ||
Repo: "airflow", | ||
GraphClient: graphClient, | ||
Logf: l.Logf, | ||
} | ||
result := checks.BranchProtection(checker) | ||
Expect(result.Error).ShouldNot(BeNil()) | ||
Expect(result.Pass).Should(BeFalse()) | ||
}) | ||
}) | ||
}) |