Merge pull request #6345 from QiWang19/mani-push-test

remote manifest test
This commit is contained in:
OpenShift Merge Robot
2020-05-22 15:47:33 +02:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@ -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,
}

View File

@ -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

View File

@ -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))