From 00db5c6eafe92f1eb1a06280d951907764ac817d Mon Sep 17 00:00:00 2001 From: Raul Sevilla Date: Mon, 12 Jul 2021 09:50:50 +0200 Subject: [PATCH 1/2] Manifest create subcommand should accept more than 2 arguments Signed-off-by: Raul Sevilla --- cmd/podman/manifest/create.go | 3 ++- test/e2e/manifest_test.go | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/podman/manifest/create.go b/cmd/podman/manifest/create.go index 9f7d74d14f..0c1ef89f9e 100644 --- a/cmd/podman/manifest/create.go +++ b/cmd/podman/manifest/create.go @@ -20,8 +20,9 @@ var ( ValidArgsFunction: common.AutocompleteImages, Example: `podman manifest create mylist:v1.11 podman manifest create mylist:v1.11 arch-specific-image-to-add + podman manifest create mylist:v1.11 arch-specific-image-to-add another-arch-specific-image-to-add podman manifest create --all mylist:v1.11 transport:tagged-image-to-add`, - Args: cobra.RangeArgs(1, 2), + Args: cobra.MinimumNArgs(1), } ) diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index b2dc4f734a..8c1ea41347 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -50,6 +50,12 @@ var _ = Describe("Podman manifest", func() { Expect(session.ExitCode()).To(Equal(0)) }) + It("podman manifest create", func() { + session := podmanTest.Podman([]string{"manifest", "create", "foo", imageList}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + }) + It("podman manifest inspect", func() { session := podmanTest.Podman([]string{"manifest", "inspect", BB}) session.WaitWithDefaultTimeout() From 6ca574dc3ab6d517257482d81b3ad6a6bbf81c43 Mon Sep 17 00:00:00 2001 From: Raul Sevilla Date: Tue, 13 Jul 2021 10:54:26 +0200 Subject: [PATCH 2/2] Update USE in order to fix tests Signed-off-by: Raul Sevilla --- cmd/podman/manifest/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/podman/manifest/create.go b/cmd/podman/manifest/create.go index 0c1ef89f9e..95c9f89b0f 100644 --- a/cmd/podman/manifest/create.go +++ b/cmd/podman/manifest/create.go @@ -13,7 +13,7 @@ import ( var ( manifestCreateOpts = entities.ManifestCreateOptions{} createCmd = &cobra.Command{ - Use: "create [options] LIST [IMAGE]", + Use: "create [options] LIST [IMAGE...]", Short: "Create manifest list or image index", Long: "Creates manifest lists or image indexes.", RunE: create,