github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/api/policychecker/policychecker_suite_test.go (about)

     1  package policychecker_test
     2  
     3  import (
     4  	"code.cloudfoundry.org/lager/lagertest"
     5  	"github.com/pf-qiu/concourse/v6/atc/policy"
     6  	"github.com/pf-qiu/concourse/v6/atc/policy/policyfakes"
     7  	. "github.com/onsi/ginkgo"
     8  	. "github.com/onsi/gomega"
     9  
    10  	"testing"
    11  )
    12  
    13  func TestAccessor(t *testing.T) {
    14  	RegisterFailHandler(Fail)
    15  	RunSpecs(t, "API PolicyChecker Suite")
    16  }
    17  
    18  var (
    19  	testLogger = lagertest.NewTestLogger("test")
    20  
    21  	fakePolicyAgent        *policyfakes.FakeAgent
    22  	fakePolicyAgentFactory *policyfakes.FakeAgentFactory
    23  )
    24  
    25  var _ = BeforeSuite(func() {
    26  	fakePolicyAgentFactory = new(policyfakes.FakeAgentFactory)
    27  	fakePolicyAgentFactory.IsConfiguredReturns(true)
    28  	fakePolicyAgentFactory.DescriptionReturns("fakeAgent")
    29  
    30  	policy.RegisterAgent(fakePolicyAgentFactory)
    31  })