From 8c559441e6e611e85d74cdc957f663eb75c4a0bd Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani <45800463+rchincha@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:01:36 -0700 Subject: [PATCH] test(cosign): add a oci dist-spec 1.1.0 conformant test case (#1835) Signed-off-by: Ramkumar Chinchani --- Makefile | 2 +- test/blackbox/sync.bats | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4ed7a73b..8bcc63ee 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/test/blackbox/sync.bats b/test/blackbox/sync.bats index 8093b15c..02bb92b5 100644 --- a/test/blackbox/sync.bats +++ b/test/blackbox/sync.bats @@ -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 @@ -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 ] }