summaryrefslogtreecommitdiff
path: root/libpod/image/pull_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-08-31 07:38:59 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-31 18:02:14 +0000
commita917f8fa2a0d9130d84bfda0c40bfe1af68d505c (patch)
treeb2070d31027cd5d6fe914072a06e969133e7edcb /libpod/image/pull_test.go
parent294c3f4cab3c5945e420a55263a7bece8a7030a1 (diff)
downloadpodman-a917f8fa2a0d9130d84bfda0c40bfe1af68d505c.tar.gz
podman-a917f8fa2a0d9130d84bfda0c40bfe1af68d505c.tar.bz2
podman-a917f8fa2a0d9130d84bfda0c40bfe1af68d505c.zip
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
Diffstat (limited to 'libpod/image/pull_test.go')
-rw-r--r--libpod/image/pull_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/libpod/image/pull_test.go b/libpod/image/pull_test.go
index 5ef8c47a5..37b45dc83 100644
--- a/libpod/image/pull_test.go
+++ b/libpod/image/pull_test.go
@@ -98,9 +98,8 @@ func TestGetPullRefPair(t *testing.T) {
"example.com/from-directory" + digestSuffix, "example.com/from-directory" + digestSuffix,
},
{ // ns/name:tag, no registry:
- // FIXME: This is interpreted as "registry == ns"
"dir:/dev/this-does-not-exist", "ns/from-directory:notlatest",
- "ns/from-directory:notlatest", "docker.io/ns/from-directory:notlatest",
+ "localhost/ns/from-directory:notlatest", "localhost/ns/from-directory:notlatest",
},
{ // containers-storage image ID
"dir:/dev/this-does-not-exist", imageID,
@@ -218,9 +217,8 @@ func TestPullGoalFromImageReference(t *testing.T) {
false,
},
{ // Relative path, multiple elements.
- // FIXME: This does not add localhost/, so dstName is normalized to docker.io/testdata.
"dir:testdata/this-does-not-exist",
- []expected{{"testdata/this-does-not-exist", "docker.io/testdata/this-does-not-exist:latest"}},
+ []expected{{"localhost/testdata/this-does-not-exist:latest", "localhost/testdata/this-does-not-exist:latest"}},
false,
},
@@ -343,12 +341,10 @@ func TestPullGoalFromPossiblyUnqualifiedName(t *testing.T) {
},
{ // Unqualified, namespaced, name-only
"ns/busybox",
- // FIXME: This is interpreted as "registry == ns", and actual pull happens from docker.io/ns/busybox:latest;
- // example.com should be first in the list but isn't used at all.
[]pullRefStrings{
- {"ns/busybox", "docker://ns/busybox:latest", "docker.io/ns/busybox:latest"},
+ {"example.com/ns/busybox:latest", "docker://example.com/ns/busybox:latest", "example.com/ns/busybox:latest"},
},
- false,
+ true,
},
{ // Unqualified, name:tag
"busybox:notlatest",