Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

fix(docker): enable TLS and sync docker test runner with compatibility workflow (#1714)

Hector Venturafb546d54c473
diff --git a/docker-compose.yml b/docker-compose.yml
index 1151d74103..b882e6a07e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -21,6 +21,11 @@ services:
FLOCI_HOSTNAME: floci
FLOCI_BASE_URL: http://floci:4566
FLOCI_SERVICES_LAMBDA_HOT_RELOAD_ENABLED: "true"
+ # Match the compatibility workflow (.github/workflows/compatibility.yml) so the
+ # local Docker test run exercises the same Floci configuration as CI.
+ # TLS proxy serves HTTP and HTTPS on the same port 4566 (first-byte sniffing),
+ # so no extra port mapping is needed — this is what makes the TLS/HTTPS suites pass.
+ FLOCI_TLS_ENABLED: "true"
networks:
floci_default:
aliases:
diff --git a/docker/run-docker-tests.sh b/docker/run-docker-tests.sh
index cbe872cfe1..fec32cb31d 100755
--- a/docker/run-docker-tests.sh
+++ b/docker/run-docker-tests.sh
@@ -63,6 +63,15 @@ for suite in "${SUITES[@]}"; do
DNS_ARGS=(--dns "$FLOCI_IP")
fi
+ # Per-suite extra args, mirroring .github/workflows/compatibility.yml.
+ # sdk-test-java's Lambda hot-reload test needs a host directory that the Docker
+ # daemon can bind-mount into the hot-reload Lambda container.
+ EXTRA_ARGS=()
+ if [ "$suite" = "sdk-test-java" ]; then
+ mkdir -p /tmp/floci-hot-reload
+ EXTRA_ARGS=(-v /tmp/floci-hot-reload:/tmp/floci-hot-reload -e HOT_RELOAD_BASE_DIR=/tmp/floci-hot-reload)
+ fi
+
# Run
docker run --rm --network "$NETWORK" \
"${DNS_ARGS[@]}" \
@@ -71,6 +80,7 @@ for suite in "${SUITES[@]}"; do
-v "$(pwd)/test-results:/results" \
-v /var/run/docker.sock:/var/run/docker.sock \
--group-add "$DOCKER_GID" \
+ "${EXTRA_ARGS[@]}" \
"$IMAGE_NAME" || echo "Test suite $suite failed"
done