test/system: Simplify code by removing a variable

The CONTAINERS_STORAGE_CONF environment variable is documented in the
podman(1) manual page [1] and there's no need to have another layer of
indirection by having another variable.

Fallout from 7a5f3ba2e2

[1] https://docs.podman.io/en/latest/markdown/podman.1.html

https://github.com/containers/toolbox/pull/1672
This commit is contained in:
Debarshi Ray 2025-06-26 23:29:29 +02:00
parent cee75ef9f2
commit f4591718e4
1 changed files with 4 additions and 3 deletions

View File

@ -3,11 +3,13 @@
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"
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 PODMAN_STORE_CONFIG_FILE="${BATS_SUITE_TMPDIR}/storage.conf"
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"
@ -41,8 +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" > "${PODMAN_STORE_CONFIG_FILE}" echo -e "[storage]\n driver = \"overlay\"\n rootless_storage_path = \"${TOOLBX_ROOTLESS_STORAGE_PATH}\"\n runroot = \"${ROOTLESS_PODMAN_RUNROOT_DIR}\"\n" > "${CONTAINERS_STORAGE_CONF}"
export CONTAINERS_STORAGE_CONF="${PODMAN_STORE_CONFIG_FILE}"
} }