Skip to content

Commit a648dd2

Browse files
authored
Remove Per-Route Options in the Apps and the App commands [v8] (#3409)
* cf apps output too versbose * cf apps output app summary * One additional unit test
1 parent 712f08b commit a648dd2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

command/v7/apps_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (cmd AppsCommand) Execute(args []string) error {
7979
func getURLs(routes []resources.Route) string {
8080
var routeURLs []string
8181
for _, route := range routes {
82-
routeURLs = append(routeURLs, route.URL+route.FormattedOptions())
82+
routeURLs = append(routeURLs, route.URL)
8383
}
8484

8585
return strings.Join(routeURLs, ", ")

command/v7/apps_command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ var _ = Describe("apps Command", func() {
240240
Expect(testUI.Out).To(Say(`Getting apps in org some-org / space some-space as steve\.\.\.`))
241241

242242
Expect(testUI.Out).To(Say(`name\s+requested state\s+processes\s+routes`))
243-
Expect(testUI.Out).To(Say(`some-app-1\s+started\s+web:2/2, console:0/0, worker:0/1\s+some-app-1.some-other-domain {loadbalancing=least-connection}, some-app-1.some-domain`))
243+
Expect(testUI.Out).To(Say(`some-app-1\s+started\s+web:2/2, console:0/0, worker:0/1\s+some-app-1.some-other-domain, some-app-1.some-domain`))
244244

245245
Expect(testUI.Err).To(Say("warning-1"))
246246
Expect(testUI.Err).To(Say("warning-2"))

command/v7/shared/app_summary_displayer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (display AppSummaryDisplayer) AppDisplay(summary v7action.DetailedApplicati
6060
func routeSummary(rs []resources.Route) string {
6161
formattedRoutes := []string{}
6262
for _, route := range rs {
63-
formattedRoutes = append(formattedRoutes, route.URL+route.FormattedOptions())
63+
formattedRoutes = append(formattedRoutes, route.URL)
6464
}
6565
return strings.Join(formattedRoutes, ", ")
6666
}

command/v7/shared/app_summary_displayer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ var _ = Describe("app summary displayer", func() {
577577
}
578578
})
579579

580-
It("displays routes", func() {
581-
Expect(testUI.Out).To(Say(`routes:\s+%s, %s`, "route1.example.com {loadbalancing=least-connection}", "route2.example.com"))
580+
It("displays routes without their options", func() {
581+
Expect(testUI.Out).To(Say(`routes:\s+%s, %s`, "route1.example.com", "route2.example.com"))
582582
})
583583
})
584584

0 commit comments

Comments
 (0)