All test scripts (unit, integration, e2e) previously overwrote the Docker ENTRYPOINT by using `--entrypoint bash`, which bypassed the container’s startup logic in `docker-entry.sh`. `docker-entry.sh` performs essential initialization steps such as: - CA bundle auto-detection (NIX_SSL_CERT_FILE, SSL_CERT_FILE, etc.) - Nix environment setup - PATH adjustments and distro logging By removing the explicit `--entrypoint bash` and invoking: bash -lc '...' directly as the container command, the Dockerfile’s ENTRYPOINT is restored and runs as intended before executing the test logic. This fixes TLS issues in CentOS E2E runs where Nix was unable to fetch flake inputs due to missing CA configuration. https://chatgpt.com/share/693ac1f3-fb7c-800f-9e5c-b40c351a9f04
27 lines
756 B
Bash
Executable File
27 lines
756 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
: "${distro:=arch}"
|
|
|
|
echo "============================================================"
|
|
echo ">>> Running INTEGRATION tests in ${distro} container"
|
|
echo "============================================================"
|
|
|
|
docker run --rm \
|
|
-v "$(pwd):/src" \
|
|
-v pkgmgr_nix_store_${distro}:/nix \
|
|
-v "pkgmgr_nix_cache_${distro}:/root/.cache/nix" \
|
|
--workdir /src \
|
|
-e PKGMGR_DEV=1 \
|
|
-e TEST_PATTERN="${TEST_PATTERN}" \
|
|
"package-manager-test-${distro}" \
|
|
bash -lc '
|
|
set -e;
|
|
git config --global --add safe.directory /src || true;
|
|
nix develop .#default --no-write-lock-file -c \
|
|
python3 -m unittest discover \
|
|
-s tests/integration \
|
|
-t /src \
|
|
-p "$TEST_PATTERN";
|
|
'
|