images --size

Add a --size option to podman images to allow for disabling computing
the size of listed images.  If listing images is critical to
performance, user may chose to turn off size computation to speed things
up.

Context: #13755
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-04-08 09:52:55 +02:00
parent 4bd35cb01f
commit e133a06d2f
10 changed files with 56 additions and 11 deletions

View File

@@ -312,4 +312,15 @@ Deleted: $pauseID"
is "$output" ""
}
@test "podman images --size" {
run_podman images
is "${lines[0]}" "REPOSITORY.*TAG.*IMAGE ID.*CREATED.*SIZE"
run_podman images --noheading --format "{{.Size}}"
is "$output" ".* MB"
run_podman images --size=false
is "${lines[0]}" "REPOSITORY.*TAG.*IMAGE ID.*CREATED"
run_podman images --noheading --format "{{.Size}}" --size=false
is "$output" "0 B"
}
# vim: filetype=sh