Skip to content

Commit 7ce1c58

Browse files
committed
Command "service": Add guid and created_at columns at end of table
* for v8, we'll also add the two new columns at the end of the table
1 parent dcafab6 commit 7ce1c58

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

command/v7/service_command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func (cmd ServiceCommand) displayBoundApps(serviceInstanceWithDetails v7action.S
241241
return
242242
}
243243

244-
table := [][]string{{"name", "guid", "binding name", "status", "created_at", "message"}}
244+
table := [][]string{{"name", "binding name", "status", "message", "guid", "created_at"}}
245245

246246
bindings := serviceInstanceWithDetails.BoundApps
247247
// sort by app name, then by created at descending
@@ -255,11 +255,11 @@ func (cmd ServiceCommand) displayBoundApps(serviceInstanceWithDetails v7action.S
255255
for _, app := range bindings {
256256
table = append(table, []string{
257257
app.AppName,
258-
app.GUID,
259258
app.Name,
260259
fmt.Sprintf("%s %s", app.LastOperation.Type, app.LastOperation.State),
261-
app.CreatedAt,
262260
app.LastOperation.Description,
261+
app.GUID,
262+
app.CreatedAt,
263263
})
264264
}
265265

command/v7/service_command_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ var _ = Describe("service command", func() {
299299
It("prints the bound apps table", func() {
300300
Expect(testUI.Out).To(SatisfyAll(
301301
Say(`Showing bound apps:\n`),
302-
Say(` name\s+guid\s+binding name\s+status\s+created_at\s+message\n`),
303-
Say(` app-1\s+guid-1\s+named-binding\s+create succeeded\s+created-at-1\s+great\n`),
304-
Say(` app-2\s+guid-2\s+update failed\s+created-at-2\s+sorry\n`),
302+
Say(` name\s+binding name\s+status\s+message\s+guid\s+created_at\n`),
303+
Say(` app-1\s+named-binding\s+create succeeded\s+great\s+guid-1\s+created-at-1\n`),
304+
Say(` app-2\s+update failed\s+sorry\s+guid-2\s+created-at-2\n`),
305305
))
306306
})
307307
})
@@ -747,10 +747,10 @@ var _ = Describe("service command", func() {
747747
It("prints the bound apps table", func() {
748748
Expect(testUI.Out).To(SatisfyAll(
749749
Say(`Showing bound apps:\n`),
750-
Say(`name\s+guid\s+binding name\s+status\s+created_at\s+message\n`),
751-
Say(`app-1\s+guid-3\s+named-binding\s+create succeeded\s+created-at-2\s+great\n`),
752-
Say(`app-1\s+guid-1\s+named-binding\s+create succeeded\s+created-at-1\s+great\n`),
753-
Say(`app-2\s+guid-2\s+update failed\s+created-at-2\s+sorry\n`),
750+
Say(`name\s+binding name\s+status\s+message\s+guid\s+created_at\n`),
751+
Say(`app-1\s+named-binding\s+create succeeded\s+great\s+guid-3\s+created-at-2\n`),
752+
Say(`app-1\s+named-binding\s+create succeeded\s+great\s+guid-1\s+created-at-1\n`),
753+
Say(`app-2\s+update failed\s+sorry\s+guid-2\s+created-at-2\n`),
754754
))
755755
})
756756
})

0 commit comments

Comments
 (0)