github.com/randomtask1155/cli@v6.41.1-0.20181227003417-a98eed78cbde+incompatible/integration/shared/isolated/bind_route_service_command_test.go (about)

     1  package isolated
     2  
     3  import (
     4  	"regexp"
     5  
     6  	"code.cloudfoundry.org/cli/integration/helpers"
     7  	. "github.com/onsi/ginkgo"
     8  	. "github.com/onsi/gomega"
     9  	. "github.com/onsi/gomega/gbytes"
    10  	. "github.com/onsi/gomega/gexec"
    11  )
    12  
    13  var _ = Describe("bind-route-service command", func() {
    14  	Describe("help", func() {
    15  		It("includes a description of the options", func() {
    16  			session := helpers.CF("help", "bind-route-service")
    17  			Eventually(session).Should(Say("NAME:"))
    18  			Eventually(session).Should(Say("bind-route-service - Bind a service instance to an HTTP route"))
    19  			Eventually(session).Should(Say("USAGE:"))
    20  			Eventually(session).Should(Say(regexp.QuoteMeta("cf bind-route-service DOMAIN [--hostname HOSTNAME] [--path PATH] SERVICE_INSTANCE [-c PARAMETERS_AS_JSON]")))
    21  			Eventually(session).Should(Say("EXAMPLES:"))
    22  			Eventually(session).Should(Say(regexp.QuoteMeta("cf bind-route-service example.com --hostname myapp --path foo myratelimiter")))
    23  			Eventually(session).Should(Say(regexp.QuoteMeta("cf bind-route-service example.com myratelimiter -c file.json")))
    24  			Eventually(session).Should(Say(regexp.QuoteMeta(`cf bind-route-service example.com myratelimiter -c '{"valid":"json"}'`)))
    25  			Eventually(session).Should(Say(regexp.QuoteMeta(`In Windows PowerShell use double-quoted, escaped JSON: "{\"valid\":\"json\"}"`)))
    26  			Eventually(session).Should(Say(regexp.QuoteMeta(`In Windows Command Line use single-quoted, escaped JSON: '{\"valid\":\"json\"}'`)))
    27  			Eventually(session).Should(Say("ALIAS:"))
    28  			Eventually(session).Should(Say("brs"))
    29  			Eventually(session).Should(Say("OPTIONS:"))
    30  			Eventually(session).Should(Say(`-c\s+Valid JSON object containing service-specific configuration parameters, provided inline or in a file\. For a list of supported configuration parameters, see documentation for the particular service offering.`))
    31  			Eventually(session).Should(Say(`--hostname, -n\s+Hostname used in combination with DOMAIN to specify the route to bind`))
    32  			Eventually(session).Should(Say(`--path\s+Path used in combination with HOSTNAME and DOMAIN to specify the route to bind`))
    33  			Eventually(session).Should(Say(`SEE ALSO:`))
    34  			Eventually(session).Should(Say(`routes, services`))
    35  			Eventually(session).Should(Exit(0))
    36  		})
    37  	})
    38  })