summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-21 16:20:30 -0400
committerGitHub <noreply@github.com>2020-09-21 16:20:30 -0400
commitd308312fa8101fd843dd6855ee4406b1c4f012ec (patch)
treeb9555a977186f18ed4692f0527ff30b52591da1e /pkg/bindings
parentdc5cc4356362274325a5b4fb2ba8ce71b12544dd (diff)
parente06230c9d5768af3e480e58b8e781e81737fc0d3 (diff)
downloadpodman-d308312fa8101fd843dd6855ee4406b1c4f012ec.tar.gz
podman-d308312fa8101fd843dd6855ee4406b1c4f012ec.tar.bz2
podman-d308312fa8101fd843dd6855ee4406b1c4f012ec.zip
Merge pull request #7695 from jwhonce/issues/7686
Restore 'id' stanza in pull results
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/images/pull.go1
-rw-r--r--pkg/bindings/test/images_test.go8
2 files changed, 5 insertions, 4 deletions
diff --git a/pkg/bindings/images/pull.go b/pkg/bindings/images/pull.go
index 261a481a2..2bfbbb2ac 100644
--- a/pkg/bindings/images/pull.go
+++ b/pkg/bindings/images/pull.go
@@ -89,6 +89,7 @@ func Pull(ctx context.Context, rawImage string, options entities.ImagePullOption
mErr = multierror.Append(mErr, errors.New(report.Error))
case len(report.Images) > 0:
images = report.Images
+ case report.ID != "":
default:
return images, errors.New("failed to parse pull results stream, unexpected input")
}
diff --git a/pkg/bindings/test/images_test.go b/pkg/bindings/test/images_test.go
index e0dd28d7a..681855293 100644
--- a/pkg/bindings/test/images_test.go
+++ b/pkg/bindings/test/images_test.go
@@ -360,19 +360,19 @@ var _ = Describe("Podman images", func() {
rawImage := "docker.io/library/busybox:latest"
pulledImages, err := images.Pull(bt.conn, rawImage, entities.ImagePullOptions{})
- Expect(err).To(BeNil())
+ Expect(err).NotTo(HaveOccurred())
Expect(len(pulledImages)).To(Equal(1))
exists, err := images.Exists(bt.conn, rawImage)
- Expect(err).To(BeNil())
+ Expect(err).NotTo(HaveOccurred())
Expect(exists).To(BeTrue())
// Make sure the normalization AND the full-transport reference works.
_, err = images.Pull(bt.conn, "docker://"+rawImage, entities.ImagePullOptions{})
- Expect(err).To(BeNil())
+ Expect(err).NotTo(HaveOccurred())
// The v2 endpoint only supports the docker transport. Let's see if that's really true.
_, err = images.Pull(bt.conn, "bogus-transport:bogus.com/image:reference", entities.ImagePullOptions{})
- Expect(err).To(Not(BeNil()))
+ Expect(err).To(HaveOccurred())
})
})