test/system: Simplify code

The "${FOO}" notation for accessing the value of a variable is not
consistently used elsewhere and ShellCheck doesn't insist on it.
Therefore, it's better to use the simpler "$FOO" notation.

https://github.com/containers/toolbox/pull/1672
This commit is contained in:
Debarshi Ray 2025-06-27 10:41:20 +02:00
parent f4591718e4
commit 01684a72e9
1 changed files with 8 additions and 8 deletions

View File

@ -3,16 +3,16 @@
load 'libs/bats-support/load' load 'libs/bats-support/load'
load 'libs/bats-assert/load' load 'libs/bats-assert/load'
readonly CONTAINERS_STORAGE_CONF="${BATS_SUITE_TMPDIR}/storage.conf" readonly CONTAINERS_STORAGE_CONF="$BATS_SUITE_TMPDIR/storage.conf"
export CONTAINERS_STORAGE_CONF export CONTAINERS_STORAGE_CONF
# Helpful globals # Helpful globals
readonly IMAGE_CACHE_DIR="${BATS_SUITE_TMPDIR}/image-cache" readonly IMAGE_CACHE_DIR="$BATS_SUITE_TMPDIR/image-cache"
readonly TOOLBX_ROOTLESS_STORAGE_PATH="${BATS_SUITE_TMPDIR}/storage" readonly TOOLBX_ROOTLESS_STORAGE_PATH="$BATS_SUITE_TMPDIR/storage"
readonly ROOTLESS_PODMAN_RUNROOT_DIR="${BATS_SUITE_TMPDIR}/runroot" readonly ROOTLESS_PODMAN_RUNROOT_DIR="$BATS_SUITE_TMPDIR/runroot"
readonly DOCKER_REG_ROOT="${BATS_SUITE_TMPDIR}/docker-registry-root" readonly DOCKER_REG_ROOT="$BATS_SUITE_TMPDIR/docker-registry-root"
readonly DOCKER_REG_CERTS_DIR="${BATS_SUITE_TMPDIR}/certs" readonly DOCKER_REG_CERTS_DIR="$BATS_SUITE_TMPDIR/certs"
readonly DOCKER_REG_AUTH_DIR="${BATS_SUITE_TMPDIR}/auth" readonly DOCKER_REG_AUTH_DIR="$BATS_SUITE_TMPDIR/auth"
readonly DOCKER_REG_URI="localhost:50000" readonly DOCKER_REG_URI="localhost:50000"
readonly DOCKER_REG_NAME="docker-registry" readonly DOCKER_REG_NAME="docker-registry"
@ -43,7 +43,7 @@ function _setup_environment() {
function _setup_containers_storage() { function _setup_containers_storage() {
# Set up a storage config file for PODMAN # Set up a storage config file for PODMAN
echo -e "[storage]\n driver = \"overlay\"\n rootless_storage_path = \"${TOOLBX_ROOTLESS_STORAGE_PATH}\"\n runroot = \"${ROOTLESS_PODMAN_RUNROOT_DIR}\"\n" > "${CONTAINERS_STORAGE_CONF}" echo -e "[storage]\n driver = \"overlay\"\n rootless_storage_path = \"$TOOLBX_ROOTLESS_STORAGE_PATH\"\n runroot = \"$ROOTLESS_PODMAN_RUNROOT_DIR\"\n" > "$CONTAINERS_STORAGE_CONF"
} }