mirror of
https://github.com/containers/podman.git
synced 2025-06-17 15:08:08 +08:00
Merge pull request #6345 from QiWang19/mani-push-test
remote manifest test
This commit is contained in:
@ -151,6 +151,7 @@ func ManifestPush(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
sc := image.GetSystemContext(rtc.Engine.SignaturePolicyPath, "", false)
|
sc := image.GetSystemContext(rtc.Engine.SignaturePolicyPath, "", false)
|
||||||
opts := manifests.PushOptions{
|
opts := manifests.PushOptions{
|
||||||
|
Store: runtime.GetStore(),
|
||||||
ImageListSelection: copy2.CopySpecificImages,
|
ImageListSelection: copy2.CopySpecificImages,
|
||||||
SystemContext: sc,
|
SystemContext: sc,
|
||||||
}
|
}
|
||||||
|
@ -112,17 +112,17 @@ func Push(ctx context.Context, name string, destination *string, all *bool) (str
|
|||||||
params := url.Values{}
|
params := url.Values{}
|
||||||
params.Set("image", name)
|
params.Set("image", name)
|
||||||
if destination != nil {
|
if destination != nil {
|
||||||
dest = name
|
dest = *destination
|
||||||
}
|
}
|
||||||
params.Set("destination", dest)
|
params.Set("destination", dest)
|
||||||
if all != nil {
|
if all != nil {
|
||||||
params.Set("all", strconv.FormatBool(*all))
|
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 {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
return idr.ID, response.Process(&idr)
|
return idr.ID, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// There is NO annotate endpoint. this binding could never work
|
// There is NO annotate endpoint. this binding could never work
|
||||||
|
@ -155,7 +155,6 @@ var _ = Describe("Podman manifest", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman manifest push", func() {
|
It("podman manifest push", func() {
|
||||||
Skip(v2remotefail)
|
|
||||||
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
@ -185,7 +184,8 @@ var _ = Describe("Podman manifest", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman manifest push purge", func() {
|
It("podman manifest push purge", func() {
|
||||||
Skip(v2remotefail)
|
// remote does not support --purge
|
||||||
|
SkipIfRemote()
|
||||||
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
Reference in New Issue
Block a user