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

@ -27,12 +27,10 @@ func TestDecompose(t *testing.T) {
},
{ // Unqualified single-name input
"busybox", "docker://", "", "busybox", "latest", false, false,
// FIXME? The [empty]/busybox syntax is surprising.
"/busybox:latest", "docker:///busybox:latest",
"busybox:latest", "docker://busybox:latest",
},
{ // Unqualified namespaced input
// FIXME: .registry == "ns" !!
"ns/busybox", "docker://", "ns", "busybox", "latest", false, true,
"ns/busybox", "docker://", "", "ns/busybox", "latest", false, false,
"ns/busybox:latest", "docker://ns/busybox:latest",
},
{ // name:tag