github.com/swisscom/cloudfoundry-cli@v7.1.0+incompatible/actor/v2action/v2action_suite_test.go (about)

     1  package v2action_test
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  
     7  	. "code.cloudfoundry.org/cli/actor/v2action"
     8  	"code.cloudfoundry.org/cli/actor/v2action/v2actionfakes"
     9  	. "github.com/onsi/ginkgo"
    10  	. "github.com/onsi/gomega"
    11  	log "github.com/sirupsen/logrus"
    12  )
    13  
    14  func TestV2Action(t *testing.T) {
    15  	RegisterFailHandler(Fail)
    16  	RunSpecs(t, "V2 Actions Suite")
    17  }
    18  
    19  var _ = BeforeEach(func() {
    20  	SetDefaultEventuallyTimeout(3 * time.Second)
    21  	log.SetLevel(log.PanicLevel)
    22  })
    23  
    24  func NewTestActor() (*Actor, *v2actionfakes.FakeCloudControllerClient, *v2actionfakes.FakeUAAClient, *v2actionfakes.FakeConfig) {
    25  	fakeCloudControllerClient := new(v2actionfakes.FakeCloudControllerClient)
    26  	fakeUAAClient := new(v2actionfakes.FakeUAAClient)
    27  	fakeConfig := new(v2actionfakes.FakeConfig)
    28  	actor := NewActor(fakeCloudControllerClient, fakeUAAClient, fakeConfig)
    29  
    30  	return actor, fakeCloudControllerClient, fakeUAAClient, fakeConfig
    31  }