github.com/ablease/cli@v6.37.1-0.20180613014814-3adbb7d7fb19+incompatible/integration/push/resource_matching_test.go (about)

     1  package push
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/integration/helpers"
     5  
     6  	. "github.com/onsi/ginkgo"
     7  	. "github.com/onsi/gomega"
     8  	. "github.com/onsi/gomega/gbytes"
     9  	. "github.com/onsi/gomega/gexec"
    10  )
    11  
    12  var _ = Describe("resource matching", func() {
    13  	var (
    14  		appName string
    15  	)
    16  
    17  	BeforeEach(func() {
    18  		appName = helpers.NewAppName()
    19  	})
    20  
    21  	Context("when the app has all of it's resources matched", func() {
    22  		It("does not display the progress bar", func() {
    23  			helpers.WithNoResourceMatchedApp(func(dir string) {
    24  				session := helpers.CustomCF(helpers.CFEnv{WorkingDirectory: dir}, PushCommandName, appName, "--no-start")
    25  				Eventually(session).Should(Say("\\+\\s+name:\\s+%s", appName))
    26  				Eventually(session).Should(Exit(0))
    27  
    28  				session = helpers.CustomCF(helpers.CFEnv{WorkingDirectory: dir}, PushCommandName, appName, "-b", "staticfile_buildpack")
    29  				Eventually(session).Should(Say("\\s+name:\\s+%s", appName))
    30  				Eventually(session).Should(Say("All files found in remote cache; nothing to upload."))
    31  				Eventually(session).Should(Exit(0))
    32  			})
    33  
    34  			session := helpers.CF("app", appName)
    35  			Eventually(session).Should(Say("name:\\s+%s", appName))
    36  			Eventually(session).Should(Exit(0))
    37  		})
    38  	})
    39  })