github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/policy/policy_suite_test.go (about) 1 package policy_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 TestPolicy(t *testing.T) { 14 RegisterFailHandler(Fail) 15 RunSpecs(t, "Policy Suite") 16 } 17 18 var ( 19 testLogger = lagertest.NewTestLogger("test") 20 21 fakeAgent *policyfakes.FakeAgent 22 fakeAgentFactory *policyfakes.FakeAgentFactory 23 ) 24 25 var _ = BeforeSuite(func() { 26 fakeAgentFactory = new(policyfakes.FakeAgentFactory) 27 fakeAgentFactory.IsConfiguredReturns(true) 28 fakeAgentFactory.DescriptionReturns("fakeAgent") 29 policy.RegisterAgent(fakeAgentFactory) 30 })