Merge pull request #10901 from rsevilla87/manifest-create-args

manifest create subcommand should accept more than 2 arguments
This commit is contained in:
OpenShift Merge Robot 2021-07-13 15:48:42 -04:00 committed by GitHub
commit 9d98f56a64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -13,15 +13,16 @@ 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,
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),
}
)

View File

@ -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()