Skip to content

Commit

Permalink
Add environment test
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-z committed Dec 28, 2024
1 parent ecb45e6 commit 32e82cb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/integration/environment/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Integration test: compression
# This test aims to verify that the unpacker can handle compressed images

set -o errexit -o nounset -o pipefail

trap 'echo "Error on line $LINENO: $BASH_COMMAND"; exit 1' ERR

docker pull alpine

__tmpdir=$(mktemp -d)
docker save alpine | APP_LOG_LEVEL=INFO pdm run docker-unpack unpack - "$__tmpdir"

# Test whether the environment variables are correctly set
apptainer exec --env MYTEST=someteststring "$__tmpdir" env | grep MYTEST

rm -rf "$__tmpdir"
echo "PASS"

0 comments on commit 32e82cb

Please sign in to comment.