mirror of https://github.com/containers/podman.git
Merge pull request #2000 from TomSweeneyRedHat/dev/tsweeney/fiximageq
Show image only once with images -q
This commit is contained in:
commit
510b5a81dc
|
@ -280,7 +280,9 @@ func getImagesTemplateOutput(ctx context.Context, runtime *libpod.Runtime, image
|
|||
if !opts.noTrunc {
|
||||
imageID = shortID(img.ID())
|
||||
}
|
||||
|
||||
// get all specified repo:tag pairs and print them separately
|
||||
outer:
|
||||
for repo, tags := range image.ReposToMap(img.Names()) {
|
||||
for _, tag := range tags {
|
||||
size, err := img.Size(ctx)
|
||||
|
@ -302,6 +304,10 @@ func getImagesTemplateOutput(ctx context.Context, runtime *libpod.Runtime, image
|
|||
Size: sizeStr,
|
||||
}
|
||||
imagesOutput = append(imagesOutput, params)
|
||||
if opts.quiet { // Show only one image ID when quiet
|
||||
break outer
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ switch is optional.
|
|||
You can run a single file of integration tests using the go test command:
|
||||
|
||||
```
|
||||
GOPATH=~/go go test -v test/e2e/libpod_suite_test.go test/e2e/your_test.go
|
||||
GOPATH=~/go go test -v test/e2e/libpod_suite_test.go test/e2e/config.go test/e2e/config_amd64.go test/e2e/your_test.go
|
||||
```
|
||||
|
||||
#### Run all tests like PAPR
|
||||
|
|
|
@ -63,6 +63,10 @@ var _ = Describe("Podman images", func() {
|
|||
session.LineInOutputContainsTag("foo", "c")
|
||||
session.LineInOutputContainsTag("bar", "a")
|
||||
session.LineInOutputContainsTag("bar", "b")
|
||||
session = podmanTest.Podman([]string{"images", "-qn"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(len(session.OutputToStringArray())).To(BeNumerically("==", 2))
|
||||
})
|
||||
|
||||
It("podman images with digests", func() {
|
||||
|
|
Loading…
Reference in New Issue