summaryrefslogtreecommitdiff
path: root/libpod/image/image_test.go
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2019-10-16 12:01:30 -0400
committerNalin Dahyabhai <nalin@redhat.com>2019-10-29 13:35:19 -0400
commit248bb61b14a3f0d4e1d244eff85b30f48554a6a8 (patch)
treebbaa162a20177f96a0fc03a48faaa49dcfc89215 /libpod/image/image_test.go
parent07195ff09fdcb0d2d3a044c92665b082d6e742b1 (diff)
downloadpodman-248bb61b14a3f0d4e1d244eff85b30f48554a6a8.tar.gz
podman-248bb61b14a3f0d4e1d244eff85b30f48554a6a8.tar.bz2
podman-248bb61b14a3f0d4e1d244eff85b30f48554a6a8.zip
images: distinguish between tags and digests
Generate an image's RepoDigests list using all applicable digests, and refrain from outputting a digest in the tag column of the "images" output. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'libpod/image/image_test.go')
-rw-r--r--libpod/image/image_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/image/image_test.go b/libpod/image/image_test.go
index ef39d09c3..5aff7d860 100644
--- a/libpod/image/image_test.go
+++ b/libpod/image/image_test.go
@@ -247,6 +247,19 @@ func TestImage_RepoDigests(t *testing.T) {
}
assert.Equal(t, test.expected, actual)
+
+ image = &Image{
+ image: &storage.Image{
+ Names: test.names,
+ Digests: []digest.Digest{dgst},
+ },
+ }
+ actual, err = image.RepoDigests()
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ assert.Equal(t, test.expected, actual)
})
}
}