fix(test): pass Docker env vars to systemd test service

The fingerprint mode CI test was not actually testing fingerprint mode
because Docker environment variables (-e AUTH_MODE=fingerprint) were not
being inherited by the systemd service running the tests.

Add PassEnvironment directive to pass AUTH_MODE and other test config
env vars from Docker to the systemd service.

Fixes the CI gap where fingerprint mode issues went undetected.
This commit is contained in:
Stanislas Lange
2025-12-29 10:34:13 +01:00
parent 62e98f79e0
commit cc1b2fafc8

View File

@@ -71,6 +71,7 @@ COPY test/validate-output.sh /opt/test/validate-output.sh
RUN chmod +x /entrypoint.sh /opt/test/validate-output.sh
# Create systemd service for the test script
# PassEnvironment passes Docker env vars (-e) from PID 1 to the service
RUN printf '%s\n' \
'[Unit]' \
'Description=OpenVPN Installation Test' \
@@ -79,6 +80,7 @@ RUN printf '%s\n' \
'[Service]' \
'Type=oneshot' \
'Environment=HOME=/root' \
'PassEnvironment=AUTH_MODE TLS_SIG TLS_KEY_FILE TLS_VERSION_MIN TLS13_CIPHERSUITES CLIENT_IPV6 VPN_SUBNET_IPV6' \
'WorkingDirectory=/root' \
'ExecStart=/entrypoint.sh' \
'RemainAfterExit=yes' \