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

Commit 3c61975

Browse files
Fix output in docker app image ls and docker app inspect to have a consistent naming
Signed-off-by: Caroline Briaud <[email protected]>
1 parent a57a93e commit 3c61975

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

e2e/commands_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func TestDockerAppLifecycle(t *testing.T) {
316316
cmd.Command = dockerCli.Command("app", "ls")
317317
checkContains(t, icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined(),
318318
[]string{
319-
`INSTALLATION\s+APPLICATION\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED\s+REFERENCE`,
319+
`RUNNING APP\s+APP NAME\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED\s+REFERENCE`,
320320
fmt.Sprintf(`%s\s+simple \(1.1.0-beta1\)\s+install\s+failure\s+.+second[s]?\sago\s+.+second[s]?\sago\s+`, appName),
321321
})
322322

@@ -344,7 +344,7 @@ func TestDockerAppLifecycle(t *testing.T) {
344344
cmd.Command = dockerCli.Command("app", "ls")
345345
checkContains(t, icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined(),
346346
[]string{
347-
`INSTALLATION\s+APPLICATION\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED\s+REFERENCE`,
347+
`RUNNING APP\s+APP NAME\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED\s+REFERENCE`,
348348
fmt.Sprintf(`%s\s+simple \(1.1.0-beta1\)\s+install\s+success\s+.+second[s]?\sago\s+.+second[s]?\sago\s+`, appName),
349349
})
350350

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Examples
22

3-
This is a collection of [Docker App](./README.MD) examples. Most of them are fairly simple, and intended to illustrate various aspects of the Docker App product.
3+
This is a collection of [Docker App](../README.MD) examples. Most of them are fairly simple, and intended to illustrate various aspects of the Docker App product.
44

55
### [Hello World: Starting example](hello-world)
66

examples/hello-world/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Next, you can check the list of running Apps:
137137

138138
```shell
139139
$ docker app ls
140-
INSTALLATION APPLICATION LAST ACTION RESULT CREATED MODIFIED REFERENCE
140+
RUNNING APP APP NAME LAST ACTION RESULT CREATED MODIFIED REFERENCE
141141
myhelloworld hello-world (0.1.0) install success About a minute ago About a minute ago docker.io/myrepo/hello-world:0.1.0
142142
```
143143

@@ -147,7 +147,7 @@ Finally you can get detailed information about a running App using the `docker a
147147

148148
```shell
149149
$ docker app inspect myhelloworld --pretty
150-
Installation:
150+
Running App:
151151
Name: myhelloworld
152152
Created: 3 minutes ago
153153
Modified: 3 minutes ago
@@ -156,7 +156,7 @@ Installation:
156156
Result: success
157157
Ochestrator: swarm
158158
159-
Application:
159+
App:
160160
Name: hello-world
161161
Version: 0.1.0
162162
Image Reference: docker.io/myrepo/hello-world:0.1.0

internal/commands/list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ var (
2121
header string
2222
value func(i *store.Installation) string
2323
}{
24-
{"INSTALLATION", func(i *store.Installation) string { return i.Name }},
25-
{"APPLICATION", func(i *store.Installation) string { return fmt.Sprintf("%s (%s)", i.Bundle.Name, i.Bundle.Version) }},
24+
{"RUNNING APP", func(i *store.Installation) string { return i.Name }},
25+
{"APP NAME", func(i *store.Installation) string { return fmt.Sprintf("%s (%s)", i.Bundle.Name, i.Bundle.Version) }},
2626
{"LAST ACTION", func(i *store.Installation) string { return i.Result.Action }},
2727
{"RESULT", func(i *store.Installation) string { return i.Result.Status }},
2828
{"CREATED", func(i *store.Installation) string {

internal/inspect/inspect.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ type Application struct {
6565
}
6666

6767
type AppInfo struct {
68-
Installation Installation `yaml:"Installation,omitempty" json:"Installation,omitempty"`
69-
Application Application `yaml:"Application,omitempty" json:"Application,omitempty"`
68+
Installation Installation `yaml:"Running App,omitempty" json:"RunningApp,omitempty"`
69+
Application Application `yaml:"App,omitempty" json:"App,omitempty"`
7070
Parameters map[string]interface{} `yaml:"Parameters,omitempty" json:"Parameters,omitempty"`
7171
}
7272

internal/inspect/testdata/inspect-app-json.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Installation": {
2+
"RunningApp": {
33
"Name": "hello-world",
44
"Created": "1 day ago",
55
"Modified": "17 hours ago",
@@ -8,7 +8,7 @@
88
"Result": "success",
99
"Orchestrator": "swarm"
1010
},
11-
"Application": {
11+
"App": {
1212
"Name": "hello-world",
1313
"Version": "0.1.0",
1414
"ImageReference": "docker.io/sirot/hello-world:0.1.0"

internal/inspect/testdata/inspect-app-pretty.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Installation:
1+
Running App:
22
Name: hello-world
33
Created: 1 day ago
44
Modified: 17 hours ago
@@ -7,7 +7,7 @@ Installation:
77
Result: success
88
Ochestrator: swarm
99

10-
Application:
10+
App:
1111
Name: hello-world
1212
Version: 0.1.0
1313
Image Reference: docker.io/sirot/hello-world:0.1.0

0 commit comments

Comments
 (0)