mirror of
https://github.com/containers/podman.git
synced 2025-06-17 15:08:08 +08:00
Use reference.TagNameOnly instead of manually adding imageParts.tag in normalizeTag
Again, rely on the official API, instead of the suprising "suspiciousTagValueForSearch" value (set to :latest on untagged images, and :none on digested ones!) CHANGES BEHAVIOR, but the previous output of normalization of digested values was not even syntatically valid, so this can't really be worse. Still, maybe we should refuse to tag with digested references in the first place. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@ -264,7 +264,7 @@ func TestNormalizeTag(t *testing.T) {
|
||||
{"#", ""}, // Clearly invalid
|
||||
{"example.com/busybox", "example.com/busybox:latest"}, // Qualified name-only
|
||||
{"example.com/busybox:notlatest", "example.com/busybox:notlatest"}, // Qualified name:tag
|
||||
{"example.com/busybox" + digestSuffix, "example.com/busybox" + digestSuffix + ":none"}, // Qualified name@digest; FIXME: The result is not even syntactically valid!
|
||||
{"example.com/busybox" + digestSuffix, "example.com/busybox" + digestSuffix}, // Qualified name@digest; FIXME? Should we allow tagging with a digest at all?
|
||||
{"example.com/busybox:notlatest" + digestSuffix, "example.com/busybox:notlatest" + digestSuffix}, // Qualified name:tag@digest
|
||||
{"busybox:latest", "localhost/busybox:latest"}, // Unqualified name-only
|
||||
{"ns/busybox:latest", "localhost/ns/busybox:latest"}, // Unqualified with a dot-less namespace
|
||||
|
Reference in New Issue
Block a user