Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 3508b0e

Browse files
Added an application column
Signed-off-by: Silvin Lubecki <[email protected]>
1 parent 5bdaed5 commit 3508b0e

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

e2e/commands_test.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,14 @@ func testDockerAppLifecycle(t *testing.T, useBindMount bool) {
320320
ExitCode: 1,
321321
Err: "error decoding 'Ports': Invalid hostPort: -1",
322322
})
323-
// TODO: List the installation and check the failed status
323+
324+
// List the installation and check the failed status
325+
cmd.Command = dockerCli.Command("app", "list")
326+
checkContains(t, icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined(),
327+
[]string{
328+
`INSTALLATION\s+APPLICATION\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED`,
329+
fmt.Sprintf(`%s\s+simple \(1.1.0-beta1\)\s+install\s+failure\s+.+second?\s+.+second`, appName),
330+
})
324331

325332
// Upgrading a failed installation is not allowed
326333
cmd.Command = dockerCli.Command("app", "upgrade", appName)
@@ -350,12 +357,12 @@ func testDockerAppLifecycle(t *testing.T, useBindMount bool) {
350357
fmt.Sprintf("[[:alnum:]]+ %s_api replicated [0-1]/1 python:3.6", appName),
351358
})
352359

353-
// List the installed applications
360+
// List the installed application
354361
cmd.Command = dockerCli.Command("app", "list")
355362
checkContains(t, icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined(),
356363
[]string{
357-
`INSTALLATION\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED`,
358-
fmt.Sprintf(`%s\s+install\s+success\s+[[:alnum:]]+\ssecond.\s+[[:alnum:]]+\ssecond`, appName),
364+
`INSTALLATION\s+APPLICATION\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED`,
365+
fmt.Sprintf(`%s\s+simple \(1.1.0-beta1\)\s+install\s+success\s+.+second.\s+.+second`, appName),
359366
})
360367

361368
// Installing again the same application is forbidden

internal/commands/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var (
2727
value func(c *claim.Claim) string
2828
}{
2929
{"INSTALLATION", func(c *claim.Claim) string { return c.Name }},
30+
{"APPLICATION", func(c *claim.Claim) string { return fmt.Sprintf("%s (%s)", c.Bundle.Name, c.Bundle.Version) }},
3031
{"LAST ACTION", func(c *claim.Claim) string { return c.Result.Action }},
3132
{"RESULT", func(c *claim.Claim) string { return c.Result.Status }},
3233
{"CREATED", func(c *claim.Claim) string { return units.HumanDuration(time.Since(c.Created)) }},

0 commit comments

Comments
 (0)