From a4de1428f9e7379aee5ce060371983afd34b85a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Wed, 12 Jun 2019 21:25:03 +0200 Subject: [PATCH] Skip systemtest/050-signing.bats if skopeo can't create signatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This does not happen in this repo's tests, but containers/image's (make test-skopeo) fails in the containers_image_openpgp configuration with > not ok 10 signing > ... > # time="2019-06-11T20:59:32Z" level=fatal msg="Signing not supported: signing is not supported in github.com/containers/image built with the containers_image_openpgp build tag" To reproduce/test this: > make test-system BUILDTAGS='ostree containers_image_openpgp' Signed-off-by: Miloslav Trmač --- systemtest/050-signing.bats | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/systemtest/050-signing.bats b/systemtest/050-signing.bats index af7e978f..5f4d19ea 100644 --- a/systemtest/050-signing.bats +++ b/systemtest/050-signing.bats @@ -82,6 +82,15 @@ END_POLICY_JSON } @test "signing" { + run_skopeo '?' standalone-sign /dev/null busybox alice@test.redhat.com -o /dev/null + if [[ "$output" =~ 'signing is not supported' ]]; then + skip "skopeo built without support for creating signatures" + return 1 + fi + if [ "$status" -ne 0 ]; then + die "exit code is $status; expected $expected_rc" + fi + # Cache local copy run_skopeo copy docker://busybox:latest dir:$TESTDIR/busybox