Skip to content

Commit ff68186

Browse files
mauricebrinkmannsethboyles
authored andcommitted
updated map-route help and test
1 parent 5fd3ebc commit ff68186

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

command/v7/map_route_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type MapRouteCommand struct {
1616
Path flag.V7RoutePath `long:"path" description:"Path for the HTTP route"`
1717
Port int `long:"port" description:"Port for the TCP route (default: random port)"`
1818
AppProtocol string `long:"app-protocol" description:"[Beta flag, subject to change] Protocol for the route destination (default: http1). Only applied to HTTP routes"`
19-
AppPort int `long:"app-port" description:"[Beta flag, subject to change] Port for the route destination (default: 8080)."`
19+
AppPort int `long:"app-port" description:"[Beta flag, subject to change] App port for the route destination (default: 8080). Only applied to HTTP routes"`
2020
Options []string `long:"option" short:"o" description:"Set the value of a per-route option"`
2121
relatedCommands interface{} `related_commands:"create-route, update-route, routes, unmap-route"`
2222
}

integration/v7/isolated/map_route_command_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var _ = Describe("map-route command", func() {
2929

3030
Eventually(session).Should(Say(`USAGE:`))
3131
Eventually(session).Should(Say(`Map an HTTP route:\n`))
32-
Eventually(session).Should(Say(`cf map-route APP_NAME DOMAIN \[--hostname HOSTNAME\] \[--path PATH\] \[--app-protocol PROTOCOL\] \[--option OPTION=VALUE\]\n`))
32+
Eventually(session).Should(Say(`cf map-route APP_NAME DOMAIN \[--hostname HOSTNAME\] \[--path PATH\] \[--app-protocol PROTOCOL\] \[--app-port PORT\] \[--option OPTION=VALUE\]\n`))
3333
Eventually(session).Should(Say(`Map a TCP route:\n`))
3434
Eventually(session).Should(Say(`cf map-route APP_NAME DOMAIN \[--port PORT] \[--option OPTION=VALUE\]\n`))
3535
Eventually(session).Should(Say(`\n`))
@@ -40,6 +40,7 @@ var _ = Describe("map-route command", func() {
4040
Eventually(session).Should(Say(`cf map-route my-app example.com --hostname myhost -o loadbalancing=least-connection # myhost.example.com with a per-route option`))
4141
Eventually(session).Should(Say(`cf map-route my-app example.com --hostname myhost --path foo # myhost.example.com/foo`))
4242
Eventually(session).Should(Say(`cf map-route my-app example.com --hostname myhost --app-protocol http2 # myhost.example.com`))
43+
Eventually(session).Should(Say(`cf map-route my-app example.com --hostname myhost --app-port 8090 # myhost.example.com`))
4344
Eventually(session).Should(Say(`cf map-route my-app example.com --port 5000 # example.com:5000`))
4445
Eventually(session).Should(Say(`\n`))
4546

@@ -48,6 +49,7 @@ var _ = Describe("map-route command", func() {
4849
Eventually(session).Should(Say(`--path\s+Path for the HTTP route`))
4950
Eventually(session).Should(Say(`--port\s+Port for the TCP route \(default: random port\)`))
5051
Eventually(session).Should(Say(`--app-protocol\s+\[Beta flag, subject to change\] Protocol for the route destination \(default: http1\). Only applied to HTTP routes`))
52+
Eventually(session).Should(Say(`--app-port\s+\[Beta flag, subject to change\] App port for the route destination \(default: 8080\). Only applied to HTTP routes`))
5153
Eventually(session).Should(Say(`--option, -o\s+Set the value of a per-route option`))
5254

5355
Eventually(session).Should(Say(`\n`))

0 commit comments

Comments
 (0)