mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
Upgrade oras cli (#1021)
* chore: upgrade oras cli Signed-off-by: Petu Eusebiu <peusebiu@cisco.com> * fix(oci references): referrers API should not return 404 if repo exists Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
@@ -63,8 +63,6 @@ function teardown_file() {
|
||||
run cat ${BATS_FILE_TMPDIR}/oci/golang/index.json
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.manifests[].annotations."org.opencontainers.image.ref.name"') = '"1.19"' ]
|
||||
run curl -X DELETE http://127.0.0.1:8080/v2/golang/manifests/1.19
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "push image index" {
|
||||
@@ -119,6 +117,23 @@ function teardown_file() {
|
||||
rm -f artifact.txt
|
||||
}
|
||||
|
||||
@test "attach oras artifacts" {
|
||||
# attach signature
|
||||
echo "{\"artifact\": \"\", \"signature\": \"pat hancock\"}" > signature.json
|
||||
run oras attach --plain-http 127.0.0.1:8080/golang:1.19 --artifact-type 'signature/example' ./signature.json:application/json
|
||||
[ "$status" -eq 0 ]
|
||||
# attach sbom
|
||||
echo "{\"version\": \"0.0.0.0\", \"artifact\": \"'127.0.0.1:8080/golang:1.19'\", \"contents\": \"good\"}" > sbom.json
|
||||
run oras attach --plain-http 127.0.0.1:8080/golang:1.19 --artifact-type 'sbom/example' ./sbom.json:application/json
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "discover oras artifacts" {
|
||||
run oras discover --plain-http -o json 127.0.0.1:8080/golang:1.19
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "$output" | jq -r ".manifests | length") -eq 2 ]
|
||||
}
|
||||
|
||||
@test "push helm chart" {
|
||||
run helm package ${BATS_FILE_TMPDIR}/helm-charts/charts/zot
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
Reference in New Issue
Block a user