From acb18adf76210055657185edc531f6870cfe0e3c Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 11 Dec 2025 14:06:39 +0100 Subject: [PATCH] test: restore Dockerfile ENTRYPOINT for all test runs (fix Nix TLS on CentOS) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/test/test-e2e.sh | 3 +-- scripts/test/test-integration.sh | 3 +-- scripts/test/test-unit.sh | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/test/test-e2e.sh b/scripts/test/test-e2e.sh index 80cd546..ddf6faa 100755 --- a/scripts/test/test-e2e.sh +++ b/scripts/test/test-e2e.sh @@ -15,9 +15,8 @@ for distro in $DISTROS; do -e PKGMGR_DEV=1 \ -e TEST_PATTERN="${TEST_PATTERN}" \ --workdir /src \ - --entrypoint bash \ "package-manager-test-${distro}" \ - -c ' + bash -lc ' set -euo pipefail # Load distro info diff --git a/scripts/test/test-integration.sh b/scripts/test/test-integration.sh index 63f82a2..42bd607 100755 --- a/scripts/test/test-integration.sh +++ b/scripts/test/test-integration.sh @@ -14,9 +14,8 @@ docker run --rm \ --workdir /src \ -e PKGMGR_DEV=1 \ -e TEST_PATTERN="${TEST_PATTERN}" \ - --entrypoint bash \ "package-manager-test-${distro}" \ - -c ' + bash -lc ' set -e; git config --global --add safe.directory /src || true; nix develop .#default --no-write-lock-file -c \ diff --git a/scripts/test/test-unit.sh b/scripts/test/test-unit.sh index 45508e7..7c0f979 100755 --- a/scripts/test/test-unit.sh +++ b/scripts/test/test-unit.sh @@ -14,9 +14,8 @@ docker run --rm \ --workdir /src \ -e PKGMGR_DEV=1 \ -e TEST_PATTERN="${TEST_PATTERN}" \ - --entrypoint bash \ "package-manager-test-${distro}" \ - -c ' + bash -lc ' set -e; git config --global --add safe.directory /src || true; nix develop .#default --no-write-lock-file -c \