github.com/sleungcy-sap/cli@v7.1.0+incompatible/integration/v6/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 text", 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_NAME\] \[-c COMMAND\] \[-f MANIFEST_PATH \| --no-manifest\] \[--no-start\]`, PushCommandName)) 19 Eventually(session).Should(Say(`cf %s APP_NAME --docker-image \[REGISTRY_HOST:PORT/\]IMAGE\[:TAG\] \[--docker-username USERNAME\]`, PushCommandName)) 20 Eventually(session).Should(Say(`cf %s -f MANIFEST_WITH_MULTIPLE_APPS_PATH \[APP_NAME\] \[--no-start\]`, PushCommandName)) 21 Eventually(session).Should(Say("OPTIONS:")) 22 Eventually(session).Should(Say("ENVIRONMENT:")) 23 Eventually(session).Should(Say("CF_STAGING_TIMEOUT=15 Max wait time for buildpack staging, in minutes")) 24 Eventually(session).Should(Say("CF_STARTUP_TIMEOUT=5 Max wait time for app instance startup, in minutes")) 25 Eventually(session).Should(Say("SEE ALSO:")) 26 Eventually(session).Should(Say("apps, create-app-manifest, logs, ssh, start")) 27 Eventually(session).Should(Exit(0)) 28 }) 29 }) 30 })