@@ -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}
252255EOF
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
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{
289294 ]
290295}
291296EOF
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 ]
0 commit comments