Skip to content
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

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

tanghaowillow
Copy link
Contributor

Add missing flags for the compose ps command.
Fixes #2502

@tanghaowillow tanghaowillow force-pushed the add-compose-ps-flags branch 2 times, most recently from e5a58a4 to e7d5a5d Compare September 16, 2023 08:59
)

func TestComposePs(t *testing.T) {
testutil.DockerIncompatible(t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

@tanghaowillow tanghaowillow Sep 19, 2023

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")
Copy link
Member

@AkihiroSuda AkihiroSuda Sep 16, 2023

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")
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AkihiroSuda
Copy link
Member

Please squash commits

Signed-off-by: tanghao <tanghao1996.seu@gmail.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 9cbd1fe into containerd:main Sep 21, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

some flags of compose ps are missing
2 participants