diff --git a/test/convert.bats b/test/convert.bats index 115a608e..7cee9198 100644 --- a/test/convert.bats +++ b/test/convert.bats @@ -79,7 +79,7 @@ EOF @test "python" { skip_slow_test git clone https://github.com/docker-library/python.git - cd python/3.11/alpine3.19 + cd python/3.11/alpine3.21 chmod -R a+rw . stacker convert --docker-file Dockerfile --output-file stacker.yaml --substitute-file stacker-subs.yaml stacker build -f stacker.yaml --substitute-file stacker-subs.yaml --substitute IMAGE=python diff --git a/test/helpers.bash b/test/helpers.bash index f61000eb..ac82cae4 100644 --- a/test/helpers.bash +++ b/test/helpers.bash @@ -8,6 +8,17 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi +function give_user_ownership() { + if [ "$PRIVILEGE_LEVEL" = "priv" ]; then + return + fi + if [ -z "$SUDO_UID" ]; then + echo "PRIVILEGE_LEVEL=$PRIVILEGE_LEVEL but empty SUDO_USER" + exit 1 + fi + chown -R "$SUDO_USER:$SUDO_USER" "$@" +} + function skip_if_no_unpriv_overlay { local wdir="" # use a workdir to ensure no side effects to the caller @@ -80,17 +91,6 @@ function stacker_setup() { chown -R $SUDO_USER:$SUDO_USER . } -function give_user_ownership() { - if [ "$PRIVILEGE_LEVEL" = "priv" ]; then - return - fi - if [ -z "$SUDO_UID" ]; then - echo "PRIVILEGE_LEVEL=$PRIVILEGE_LEVEL but empty SUDO_USER" - exit 1 - fi - chown -R "$SUDO_USER:$SUDO_USER" "$@" - } - function cleanup() { cd "$ROOT_DIR/test" umount_under "$TEST_TMPDIR"