github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/integration/v7/push/help_test.go (about)

     1  package push
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/integration/helpers"
     5  	. "github.com/onsi/ginkgo"
     6  	. "github.com/onsi/gomega"
     7  	. "github.com/onsi/gomega/gbytes"
     8  	. "github.com/onsi/gomega/gexec"
     9  )
    10  
    11  var _ = Describe("help", func() {
    12  	When("--help flag is set", func() {
    13  		It("Displays command usage to output", func() {
    14  			session := helpers.CF(PushCommandName, "--help")
    15  			Eventually(session).Should(Say("NAME:"))
    16  			Eventually(session).Should(Say("%s - Push a new app or sync changes to an existing app", PushCommandName))
    17  			Eventually(session).Should(Say("USAGE:"))
    18  			Eventually(session).Should(Say(`cf %s APP_NAME \[-b BUILDPACK\]\.\.\. \[-p APP_PATH\] \[--no-route\]`, PushCommandName))
    19  			Eventually(session).Should(Say(`cf %s APP_NAME --docker-image \[REGISTRY_HOST:PORT/\]IMAGE\[:TAG\] \[--docker-username USERNAME\] \[--no-route\]`, PushCommandName))
    20  			Eventually(session).Should(Say("OPTIONS:"))
    21  			Eventually(session).Should(Say(`-b\s+Custom buildpack by name \(e\.g\. my-buildpack\) or Git URL \(e\.g\. 'https://github.com/cloudfoundry/java-buildpack.git'\) or Git URL with a branch or tag \(e\.g\. 'https://github.com/cloudfoundry/java-buildpack\.git#v3.3.0' for 'v3.3.0' tag\)\. To use built-in buildpacks only, specify 'default' or 'null'`))
    22  			Eventually(session).Should(Say(`--docker-image, -o\s+Docker image to use \(e\.g\. user/docker-image-name\)`))
    23  			Eventually(session).Should(Say(`--docker-username\s+Repository username; used with password from environment variable CF_DOCKER_PASSWORD`))
    24  			Eventually(session).Should(Say(`--no-route\s+Do not map a route to this app`))
    25  			Eventually(session).Should(Say(`--no-start\s+Do not stage and start the app after pushing`))
    26  			Eventually(session).Should(Say(`-p\s+Path to app directory or to a zip file of the contents of the app directory`))
    27  			Eventually(session).Should(Say("ENVIRONMENT:"))
    28  			Eventually(session).Should(Say(`CF_DOCKER_PASSWORD=\s+Password used for private docker repository`))
    29  			Eventually(session).Should(Say(`CF_STAGING_TIMEOUT=15\s+Max wait time for buildpack staging, in minutes`))
    30  			Eventually(session).Should(Say(`CF_STARTUP_TIMEOUT=5\s+Max wait time for app instance startup, in minutes`))
    31  
    32  			Eventually(session).Should(Exit(0))
    33  		})
    34  	})
    35  })