Skip to content

Commit 244c285

Browse files
committed
ci: fix notation related failures
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
1 parent befe276 commit 244c285

4 files changed

Lines changed: 16 additions & 8 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ STACKER := $(shell which stacker)
1212
GOLINTER := $(TOOLSDIR)/bin/golangci-lint
1313
GOLINTER_VERSION := v2.1.0
1414
NOTATION := $(TOOLSDIR)/bin/notation
15-
NOTATION_VERSION := 1.0.0
15+
NOTATION_VERSION := 1.3.2
1616
COSIGN := $(TOOLSDIR)/bin/cosign
1717
COSIGN_VERSION := 2.2.0
1818
HELM := $(TOOLSDIR)/bin/helm

test/blackbox/annotations.bats

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ function setup_file() {
2929
if ! $(verify_prerequisites); then
3030
exit 1
3131
fi
32+
33+
run mkdir -p ${HOME}/.config/notation
34+
3235
# Download test data to folder common for the entire suite, not just this file
3336
skopeo --insecure-policy copy --format=oci docker://ghcr.io/project-zot/golang:1.20 oci:${TEST_DATA_DIR}/golang:1.20
3437
# Setup zot server
@@ -230,7 +233,7 @@ function teardown_file() {
230233
run notation cert generate-test "notation-sign-test"
231234
[ "$status" -eq 0 ]
232235

233-
local trust_policy_file=${HOME}/.config/notation/trustpolicy.json
236+
local trust_policy_file=./trustpolicy.json
234237

235238
cat >${trust_policy_file} <<EOF
236239
{
@@ -251,6 +254,8 @@ function teardown_file() {
251254
}
252255
EOF
253256

257+
run notation policy import ${trust_policy_file}
258+
[ "$status" -eq 0 ]
254259
run notation sign --key "notation-sign-test" --insecure-registry localhost:${zot_port}/annotations:latest
255260
[ "$status" -eq 0 ]
256261
run notation verify --insecure-registry localhost:${zot_port}/annotations:latest
@@ -269,7 +274,7 @@ EOF
269274
run notation cert generate-test "notation-sign-test-experimental"
270275
[ "$status" -eq 0 ]
271276

272-
local trust_policy_file=${HOME}/.config/notation/trustpolicy.json
277+
local trust_policy_file=./trustpolicy.json
273278

274279
cat >${trust_policy_file} <<EOF
275280
{
@@ -289,7 +294,8 @@ EOF
289294
]
290295
}
291296
EOF
292-
297+
run notation policy import ${trust_policy_file}
298+
[ "$status" -eq 0 ]
293299
export NOTATION_EXPERIMENTAL=1
294300
run notation sign --allow-referrers-api --key "notation-sign-test-experimental" --insecure-registry localhost:${zot_port}/annotations:latest
295301
[ "$status" -eq 0 ]

test/blackbox/sync.bats

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ function teardown_file() {
286286
run notation cert generate-test "notation-sign-sync-test"
287287
[ "$status" -eq 0 ]
288288

289-
local trust_policy_file=${HOME}/.config/notation/trustpolicy.json
289+
local trust_policy_file=./trustpolicy.json
290290

291291
cat >${trust_policy_file} <<EOF
292292
{
@@ -306,7 +306,8 @@ function teardown_file() {
306306
]
307307
}
308308
EOF
309-
309+
run notation policy import ${trust_policy_file}
310+
[ "$status" -eq 0 ]
310311
run notation sign --key "notation-sign-sync-test" --insecure-registry localhost:${zot_port3}/golang:1.20
311312
[ "$status" -eq 0 ]
312313
run notation verify --insecure-registry localhost:${zot_port3}/golang:1.20

test/blackbox/sync_cloud.bats

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function teardown_file() {
313313
run notation cert generate-test "notation-sign-sync-test"
314314
[ "$status" -eq 0 ]
315315

316-
local trust_policy_file=${HOME}/.config/notation/trustpolicy.json
316+
local trust_policy_file=./trustpolicy.json
317317

318318
cat >${trust_policy_file} <<EOF
319319
{
@@ -333,7 +333,8 @@ function teardown_file() {
333333
]
334334
}
335335
EOF
336-
336+
run notation policy import ${trust_policy_file}
337+
[ "$status" -eq 0 ]
337338
run notation sign --key "notation-sign-sync-test" --insecure-registry localhost:${zot_port3}/golang:1.20
338339
[ "$status" -eq 0 ]
339340
run notation verify --insecure-registry localhost:${zot_port3}/golang:1.20

0 commit comments

Comments
 (0)