Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Commit

Permalink
Fix output in docker app image ls and docker app inspect to have a co…
Browse files Browse the repository at this point in the history
…nsistent naming

Signed-off-by: Caroline Briaud <caroline.briaud@docker.com>
  • Loading branch information
carolinebriaud committed Nov 18, 2019
1 parent a57a93e commit 3c61975
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions e2e/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func TestDockerAppLifecycle(t *testing.T) {
cmd.Command = dockerCli.Command("app", "ls")
checkContains(t, icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined(),
[]string{
`INSTALLATION\s+APPLICATION\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED\s+REFERENCE`,
`RUNNING APP\s+APP NAME\s+LAST ACTION\s+RESULT\s+CREATED\s+MODIFIED\s+REFERENCE`,
fmt.Sprintf(`%s\s+simple \(1.1.0-beta1\)\s+install\s+failure\s+.+second[s]?\sago\s+.+second[s]?\sago\s+`, appName),
})

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

Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Examples

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.
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.

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

Expand Down
6 changes: 3 additions & 3 deletions examples/hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Next, you can check the list of running Apps:

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

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

```shell
$ docker app inspect myhelloworld --pretty
Installation:
Running App:
Name: myhelloworld
Created: 3 minutes ago
Modified: 3 minutes ago
Expand All @@ -156,7 +156,7 @@ Installation:
Result: success
Ochestrator: swarm
Application:
App:
Name: hello-world
Version: 0.1.0
Image Reference: docker.io/myrepo/hello-world:0.1.0
Expand Down
4 changes: 2 additions & 2 deletions internal/commands/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var (
header string
value func(i *store.Installation) string
}{
{"INSTALLATION", func(i *store.Installation) string { return i.Name }},
{"APPLICATION", func(i *store.Installation) string { return fmt.Sprintf("%s (%s)", i.Bundle.Name, i.Bundle.Version) }},
{"RUNNING APP", func(i *store.Installation) string { return i.Name }},
{"APP NAME", func(i *store.Installation) string { return fmt.Sprintf("%s (%s)", i.Bundle.Name, i.Bundle.Version) }},
{"LAST ACTION", func(i *store.Installation) string { return i.Result.Action }},
{"RESULT", func(i *store.Installation) string { return i.Result.Status }},
{"CREATED", func(i *store.Installation) string {
Expand Down
4 changes: 2 additions & 2 deletions internal/inspect/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ type Application struct {
}

type AppInfo struct {
Installation Installation `yaml:"Installation,omitempty" json:"Installation,omitempty"`
Application Application `yaml:"Application,omitempty" json:"Application,omitempty"`
Installation Installation `yaml:"Running App,omitempty" json:"RunningApp,omitempty"`
Application Application `yaml:"App,omitempty" json:"App,omitempty"`
Parameters map[string]interface{} `yaml:"Parameters,omitempty" json:"Parameters,omitempty"`
}

Expand Down
4 changes: 2 additions & 2 deletions internal/inspect/testdata/inspect-app-json.golden
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Installation": {
"RunningApp": {
"Name": "hello-world",
"Created": "1 day ago",
"Modified": "17 hours ago",
Expand All @@ -8,7 +8,7 @@
"Result": "success",
"Orchestrator": "swarm"
},
"Application": {
"App": {
"Name": "hello-world",
"Version": "0.1.0",
"ImageReference": "docker.io/sirot/hello-world:0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions internal/inspect/testdata/inspect-app-pretty.golden
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Installation:
Running App:
Name: hello-world
Created: 1 day ago
Modified: 17 hours ago
Expand All @@ -7,7 +7,7 @@ Installation:
Result: success
Ochestrator: swarm

Application:
App:
Name: hello-world
Version: 0.1.0
Image Reference: docker.io/sirot/hello-world:0.1.0
Expand Down

0 comments on commit 3c61975

Please sign in to comment.