github.com/nimakaviani/cli@v6.37.1-0.20180619223813-e734901a73fa+incompatible/actor/pushaction/pushaction_suite_test.go (about)

     1  package pushaction_test
     2  
     3  import (
     4  	"os"
     5  	"time"
     6  
     7  	. "code.cloudfoundry.org/cli/actor/pushaction"
     8  	. "github.com/onsi/ginkgo"
     9  	. "github.com/onsi/gomega"
    10  	. "github.com/onsi/gomega/types"
    11  
    12  	"testing"
    13  
    14  	log "github.com/sirupsen/logrus"
    15  )
    16  
    17  func TestPushAction(t *testing.T) {
    18  	RegisterFailHandler(Fail)
    19  	RunSpecs(t, "Push Actions Suite")
    20  }
    21  
    22  var _ = BeforeEach(func() {
    23  	SetDefaultEventuallyTimeout(3 * time.Second)
    24  	log.SetLevel(log.PanicLevel)
    25  })
    26  
    27  func EqualEither(events ...Event) GomegaMatcher {
    28  	var equals []GomegaMatcher
    29  	for _, event := range events {
    30  		equals = append(equals, Equal(event))
    31  	}
    32  
    33  	return Or(equals...)
    34  }
    35  
    36  func getCurrentDir() string {
    37  	pwd, err := os.Getwd()
    38  	Expect(err).NotTo(HaveOccurred())
    39  	return pwd
    40  }