fix(ci): enhance rate limit integration test reliability
- Added HTTP status checks for login and security config POST requests to ensure proper error handling. - Implemented a readiness gate for the Caddy admin API before applying security configurations. - Increased sleep duration before verifying rate limit handler to accommodate Caddy's configuration propagation. - Changed verification failure from a warning to a hard exit to prevent misleading test results. - Updated Caddy admin API URL to use the canonical trailing slash in multiple locations. - Adjusted retry parameters for rate limit verification to reduce polling noise. - Removed stale GeoIP checksum validation from the Dockerfile's non-CI path to simplify the build process.
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -451,16 +451,11 @@ RUN mkdir -p /app/data/geoip && \
|
||||
else \
|
||||
echo "Local - full download (30s timeout, 3 retries)"; \
|
||||
if wget -qO /app/data/geoip/GeoLite2-Country.mmdb \
|
||||
-T 30 -t 4 "https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-Country.mmdb"; then \
|
||||
if [ -s /app/data/geoip/GeoLite2-Country.mmdb ] && \
|
||||
echo "${GEOLITE2_COUNTRY_SHA256} /app/data/geoip/GeoLite2-Country.mmdb" | sha256sum -c -; then \
|
||||
echo "✅ GeoIP checksum verified"; \
|
||||
else \
|
||||
echo "⚠️ Checksum failed"; \
|
||||
touch /app/data/geoip/GeoLite2-Country.mmdb.placeholder; \
|
||||
fi; \
|
||||
-T 30 -t 4 "https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-Country.mmdb" \
|
||||
&& [ -s /app/data/geoip/GeoLite2-Country.mmdb ]; then \
|
||||
echo "✅ GeoIP downloaded"; \
|
||||
else \
|
||||
echo "⚠️ Download failed"; \
|
||||
echo "⚠️ GeoIP download failed or empty — skipping"; \
|
||||
touch /app/data/geoip/GeoLite2-Country.mmdb.placeholder; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user