Skip to content

Commit

Permalink
test(cosign): add a oci dist-spec 1.1.0 conformant test case (#1835)
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha authored Sep 20, 2023
1 parent f164fb9 commit 8c55944
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GOLINTER_VERSION := v1.52.2
NOTATION := $(TOOLSDIR)/bin/notation
NOTATION_VERSION := 1.0.0-rc.4
COSIGN := $(TOOLSDIR)/bin/cosign
COSIGN_VERSION := 2.0.2
COSIGN_VERSION := 2.2.0
HELM := $(TOOLSDIR)/bin/helm
ORAS := $(TOOLSDIR)/bin/oras
ORAS_VERSION := 1.0.0-rc.1
Expand Down
4 changes: 4 additions & 0 deletions test/blackbox/sync.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function verify_prerequisites() {

function setup_file() {
export COSIGN_PASSWORD=""
export COSIGN_OCI_EXPERIMENTAL=1
export COSIGN_EXPERIMENTAL=1

# Verify prerequisites are available
if ! $(verify_prerequisites); then
Expand Down Expand Up @@ -258,6 +260,8 @@ function teardown_file() {
[ "$status" -eq 0 ]
run cosign sign --key ${BATS_FILE_TMPDIR}/cosign-sign-sync-test.key localhost:9000/golang:1.20 --yes
[ "$status" -eq 0 ]
run cosign sign --registry-referrers-mode=oci-1-1 --key ${BATS_FILE_TMPDIR}/cosign-sign-sync-test.key localhost:9000/golang:1.20 --yes
[ "$status" -eq 0 ]
run cosign verify --key ${BATS_FILE_TMPDIR}/cosign-sign-sync-test.pub localhost:9000/golang:1.20
[ "$status" -eq 0 ]
}
Expand Down

0 comments on commit 8c55944

Please sign in to comment.