diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index ec5f9018..bfb724bf 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -61,6 +61,9 @@ _run_setup() { # VM's come with the distro. skopeo package pre-installed dnf erase -y skopeo + # Required for testing the SIF transport + dnf install -y fakeroot squashfs-tools + # A slew of compiled binaries are pre-built and distributed # within the CI/Dev container image, but we want to run # things directly on the host VM. Fortunately they're all diff --git a/systemtest/020-copy.bats b/systemtest/020-copy.bats index c302fb50..d29a91ec 100644 --- a/systemtest/020-copy.bats +++ b/systemtest/020-copy.bats @@ -144,6 +144,14 @@ function setup() { diff -urN $shareddir $dir2/blobs } +@test "copy: sif image" { + local localimg=dir:$TESTDIR/dir + + run_skopeo copy sif:${TEST_SOURCE_DIR}/testdata/busybox_latest.sif $localimg + run_skopeo inspect $localimg --format "{{.Architecture}}" + expect_output "amd64" +} + teardown() { podman rm -f reg diff --git a/systemtest/helpers.bash b/systemtest/helpers.bash index 2f57b215..a81c646e 100644 --- a/systemtest/helpers.bash +++ b/systemtest/helpers.bash @@ -1,6 +1,10 @@ #!/bin/bash -SKOPEO_BINARY=${SKOPEO_BINARY:-$(dirname ${BASH_SOURCE})/../skopeo} +# Directory containing system test sources +TEST_SOURCE_DIR=${TEST_SOURCE_DIR:-$(dirname ${BASH_SOURCE})} + +# Skopeo executable +SKOPEO_BINARY=${SKOPEO_BINARY:-${TEST_SOURCE_DIR}/../bin/skopeo} # Default timeout for a skopeo command. SKOPEO_TIMEOUT=${SKOPEO_TIMEOUT:-300} diff --git a/systemtest/testdata/busybox_latest.sif b/systemtest/testdata/busybox_latest.sif new file mode 100755 index 00000000..f8bca1ad Binary files /dev/null and b/systemtest/testdata/busybox_latest.sif differ