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:
peusebiu
2022-11-28 20:43:53 +02:00
committed by GitHub
parent 1d97d1e796
commit c82748ab39
6 changed files with 54 additions and 21 deletions
+17 -2
View File
@@ -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 ]