We are mistakenly seeing repos as registries.

Currently `podman pull rhel7/rhel-tools` is failing because it
sees rhel7 as a registry.  This change will verify that the returned
registry from the parser is actually a registry and not a repo,
if a repo it will return the correct content, and we will pull the image.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1387
Approved by: mtrmac
This commit is contained in:
Daniel J Walsh
2018-08-31 07:38:59 -04:00
committed by Atomic Bot
parent 294c3f4cab
commit a917f8fa2a
4 changed files with 29 additions and 18 deletions

View File

@ -221,7 +221,7 @@ func TestNormalizeTag(t *testing.T) {
{"example.com/busybox" + digestSuffix, "example.com/busybox" + digestSuffix + ":none"}, // Qualified name@digest; FIXME: The result is not even syntactically valid!
{"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", "ns/busybox:latest"}, // Unqualified with a dot-less namespace FIXME: "ns" is treated as a registry
{"ns/busybox:latest", "localhost/ns/busybox:latest"}, // Unqualified with a dot-less namespace
} {
res, err := normalizeTag(c.input)
if c.expected == "" {