summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-22 15:47:33 +0200
committerGitHub <noreply@github.com>2020-05-22 15:47:33 +0200
commitcf5d33807ffefb4738d6f2477c08f4955ff630ba (patch)
tree3f4ddac1d62cefbb88d63e0ab2a8c940482b3d92
parent8fe0e294b5ba234554960c1355b74c70babafec0 (diff)
parentf7dd915acccd42208edb2d7630f8f3dd48c7ec10 (diff)
downloadpodman-cf5d33807ffefb4738d6f2477c08f4955ff630ba.tar.gz
podman-cf5d33807ffefb4738d6f2477c08f4955ff630ba.tar.bz2
podman-cf5d33807ffefb4738d6f2477c08f4955ff630ba.zip
Merge pull request #6345 from QiWang19/mani-push-test
remote manifest test
-rw-r--r--pkg/api/handlers/libpod/manifests.go1
-rw-r--r--pkg/bindings/manifests/manifests.go6
-rw-r--r--test/e2e/manifest_test.go4
3 files changed, 6 insertions, 5 deletions
diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go
index d87ed7eba..93ca367f7 100644
--- a/pkg/api/handlers/libpod/manifests.go
+++ b/pkg/api/handlers/libpod/manifests.go
@@ -151,6 +151,7 @@ func ManifestPush(w http.ResponseWriter, r *http.Request) {
}
sc := image.GetSystemContext(rtc.Engine.SignaturePolicyPath, "", false)
opts := manifests.PushOptions{
+ Store: runtime.GetStore(),
ImageListSelection: copy2.CopySpecificImages,
SystemContext: sc,
}
diff --git a/pkg/bindings/manifests/manifests.go b/pkg/bindings/manifests/manifests.go
index 3e0ef0325..f5ee31d93 100644
--- a/pkg/bindings/manifests/manifests.go
+++ b/pkg/bindings/manifests/manifests.go
@@ -112,17 +112,17 @@ func Push(ctx context.Context, name string, destination *string, all *bool) (str
params := url.Values{}
params.Set("image", name)
if destination != nil {
- dest = name
+ dest = *destination
}
params.Set("destination", dest)
if all != nil {
params.Set("all", strconv.FormatBool(*all))
}
- response, err := conn.DoRequest(nil, http.MethodPost, "/manifests/%s/push", params, name)
+ _, err = conn.DoRequest(nil, http.MethodPost, "/manifests/%s/push", params, name)
if err != nil {
return "", err
}
- return idr.ID, response.Process(&idr)
+ return idr.ID, err
}
// There is NO annotate endpoint. this binding could never work
diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go
index c47e20276..1137ebe8e 100644
--- a/test/e2e/manifest_test.go
+++ b/test/e2e/manifest_test.go
@@ -155,7 +155,6 @@ var _ = Describe("Podman manifest", func() {
})
It("podman manifest push", func() {
- Skip(v2remotefail)
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -185,7 +184,8 @@ var _ = Describe("Podman manifest", func() {
})
It("podman manifest push purge", func() {
- Skip(v2remotefail)
+ // remote does not support --purge
+ SkipIfRemote()
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))