-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compose ps flags #2509
Add compose ps flags #2509
Conversation
e5a58a4
to
e7d5a5d
Compare
cmd/nerdctl/compose_ps_linux_test.go
Outdated
) | ||
|
||
func TestComposePs(t *testing.T) { | ||
testutil.DockerIncompatible(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -68,13 +68,13 @@ volumes: | |||
|
|||
// stop and restart a single service. | |||
base.ComposeCmd("-f", comp.YAMLFullPath(), "stop", "db").AssertOK() | |||
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "db").AssertOutContainsAny("Exit", "exited") | |||
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "db", "-a").AssertOutContainsAny("Exit", "exited") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DockerIncompatible() can be now probably removed
@@ -46,7 +46,7 @@ services: | |||
|
|||
// 1.1 `compose create` should create service container (in `created` status) | |||
base.ComposeCmd("-f", comp.YAMLFullPath(), "create").AssertOK() | |||
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "svc0").AssertOutContainsAny("Created", "created") | |||
base.ComposeCmd("-f", comp.YAMLFullPath(), "ps", "svc0", "-a").AssertOutContainsAny("Created", "created") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DockerIncompatible() can be now probably removed
composePsCommand.Flags().StringArray("status", []string{}, "Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]") | ||
composePsCommand.Flags().BoolP("quiet", "q", false, "Only display container IDs") | ||
composePsCommand.Flags().Bool("services", false, "Display services") | ||
composePsCommand.Flags().BoolP("all", "a", false, "Show all containers (default shows just running)") | ||
return composePsCommand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c00075f
to
190c7f8
Compare
Please squash commits |
Signed-off-by: tanghao <tanghao1996.seu@gmail.com>
1151829
to
1b5a986
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Add missing flags for the
compose ps
command.Fixes #2502