diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/image/pull.go | 17 | ||||
-rw-r--r-- | libpod/image/pull_test.go | 3 |
2 files changed, 4 insertions, 16 deletions
diff --git a/libpod/image/pull.go b/libpod/image/pull.go index d4be53ef8..ee5e333e3 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -284,24 +284,13 @@ func (ir *Runtime) pullGoalFromPossiblyUnqualifiedName(inputName string) (*pullG return nil, err } if decomposedImage.hasRegistry { - var imageName, destName string - if hasShaInInputName(inputName) { - imageName = inputName - } else { - imageName = decomposedImage.assemble() - } - srcRef, err := docker.ParseReference("//" + imageName) + srcRef, err := docker.ParseReference("//" + inputName) if err != nil { return nil, errors.Wrapf(err, "unable to parse '%s'", inputName) } - if hasShaInInputName(inputName) { - destName = decomposedImage.assemble() - } else { - destName = inputName - } - destRef, err := is.Transport.ParseStoreReference(ir.store, destName) + destRef, err := is.Transport.ParseStoreReference(ir.store, inputName) if err != nil { - return nil, errors.Wrapf(err, "error parsing dest reference name %#v", destName) + return nil, errors.Wrapf(err, "error parsing dest reference name %#v", inputName) } ps := pullRefPair{ image: inputName, diff --git a/libpod/image/pull_test.go b/libpod/image/pull_test.go index 37b45dc83..4a0119070 100644 --- a/libpod/image/pull_test.go +++ b/libpod/image/pull_test.go @@ -324,8 +324,7 @@ func TestPullGoalFromPossiblyUnqualifiedName(t *testing.T) { { // Qualified example.com, name@digest. "example.com/ns/busybox" + digestSuffix, []pullRefStrings{{"example.com/ns/busybox" + digestSuffix, "docker://example.com/ns/busybox" + digestSuffix, - // FIXME?! Why is .dstName dropping the digest, and adding :none?! - "example.com/ns/busybox:none"}}, + "example.com/ns/busybox" + digestSuffix}}, false, }, // Qualified example.com, name:tag@digest. This code is happy to try, but .srcRef parsing currently rejects such input. |