2021-01-27 02:34:05 +03:00
|
|
|
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() {
|
2021-02-26 21:00:05 +03:00
|
|
|
It("Should fail to return branch protection on other repositories", func() {
|
2021-01-27 02:34:05 +03:00
|
|
|
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())
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|