github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/test/apiv2/15-manifest.at (about) 1 # -*- sh -*- 2 # 3 # Tests for manifest list endpoints 4 5 start_registry 6 7 t POST /v3.4.0/libpod/manifests/create?name=abc 200 \ 8 .Id~[0-9a-f]\\{64\\} 9 id_abc=$(jq -r '.Id' <<<"$output") 10 11 t POST /v4.0.0/libpod/manifests/xyz 201 \ 12 .Id~[0-9a-f]\\{64\\} 13 id_xyz=$(jq -r '.Id' <<<"$output") 14 15 t GET /v3.4.0/libpod/manifests/$id_abc/exists 204 16 t GET /v4.0.0/libpod/manifests/$id_xyz/exists 204 17 18 id_abc_image=$($PODMAN_BIN --root $WORKDIR/server_root image build -q --format=docker -<<EOF 19 FROM alpine 20 RUN >file1 21 EOF 22 ) 23 24 id_xyz_image=$($PODMAN_BIN --root $WORKDIR/server_root image build -q --format=docker -<<EOF 25 FROM alpine 26 RUN >file2 27 EOF 28 ) 29 30 function cleanUpManifestTest() { 31 podman rmi -a 32 } 33 34 t POST /v3.4.0/libpod/manifests/$id_abc/add images="[\"containers-storage:$id_abc_image\"]" 200 35 t PUT /v4.0.0/libpod/manifests/$id_xyz operation='update' images="[\"containers-storage:$id_xyz_image\"]" 200 36 37 t POST "/v3.4.0/libpod/manifests/abc:latest/push?destination=localhost:$REGISTRY_PORT%2Fabc:latest&tlsVerify=false&all=true" 200 38 t POST "/v4.0.0/libpod/manifests/xyz:latest/registry/localhost:$REGISTRY_PORT%2Fxyz:latest?tlsVerify=false&all=true" 200 39 40 # /v3.x cannot delete a manifest list 41 t DELETE /v4.0.0/libpod/manifests/$id_abc 200 42 t DELETE /v4.0.0/libpod/manifests/$id_xyz 200 43 44 cleanUpManifestTest