From 8de3d56d4b8575e137b5bf26dcb6d045f2ef78e1 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Thu, 3 Sep 2026 19:10:30 +0200 Subject: [PATCH] Fix HTTP-client integration test mock images and improve failure logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mock services in docker-compose.ci.yml were pinned to golang:1.27.0-alpine, which is now too old to run against go.mod's 1.27.1 requirement (GOTOOLCHAIN=local makes this an immediate, silent container crash: "go.mod requires go >= 1.27.1 (running go 1.27.0)"). Bump all three mock images to 1.27.1-alpine to match. Also make `make test-http-client` dump docker compose logs (and tear down) whenever `docker compose up --wait` itself fails, not only after the .http test run — that path previously aborted with no diagnostic output at all. Switch the post-run log dump to plain `docker compose logs` (all services) instead of three hardcoded per-service calls, which had silently omitted tunein-mock. Co-Authored-By: Claude Sonnet 5 --- Makefile | 17 +++++++++++------ docker-compose.ci.yml | 6 +++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 1135808e..3bc3e361 100644 --- a/Makefile +++ b/Makefile @@ -174,9 +174,16 @@ test-http-client-rotate: test-http-client: @echo "Starting services with docker compose (waiting for healthchecks)..." - @docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --build --wait - @echo "Running .http tests..." - @docker run --rm --network soundtouch-test-net \ + @docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --build --wait; \ + UP_EXIT_CODE=$$?; \ + if [ $$UP_EXIT_CODE -ne 0 ]; then \ + echo "docker compose up failed (exit $$UP_EXIT_CODE); dumping container logs:"; \ + docker compose -f docker-compose.yml -f docker-compose.ci.yml logs; \ + docker compose -f docker-compose.yml -f docker-compose.ci.yml down; \ + exit $$UP_EXIT_CODE; \ + fi; \ + echo "Running .http tests..."; \ + docker run --rm --network soundtouch-test-net \ -v "$(PWD)/tests/integration/http-client:/workdir" \ jetbrains/intellij-http-client:2026.1 \ --env-file /workdir/http-client.env.json \ @@ -236,9 +243,7 @@ test-http-client: /workdir/unregister_device.http \ --report; \ EXIT_CODE=$$?; \ - docker compose -f docker-compose.yml -f docker-compose.ci.yml logs soundtouch-service; \ - docker compose -f docker-compose.yml -f docker-compose.ci.yml logs spotify-mock; \ - docker compose -f docker-compose.yml -f docker-compose.ci.yml logs amazon-mock; \ + docker compose -f docker-compose.yml -f docker-compose.ci.yml logs; \ docker compose -f docker-compose.yml -f docker-compose.ci.yml down; \ exit $$EXIT_CODE diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index b83ed433..033e1d09 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -35,7 +35,7 @@ services: start_period: 3s spotify-mock: - image: golang:1.27.0-alpine + image: golang:1.27.1-alpine container_name: spotify-mock working_dir: /app volumes: @@ -53,7 +53,7 @@ services: start_period: 3s amazon-mock: - image: golang:1.27.0-alpine + image: golang:1.27.1-alpine container_name: amazon-mock working_dir: /app volumes: @@ -71,7 +71,7 @@ services: start_period: 3s tunein-mock: - image: golang:1.27.0-alpine + image: golang:1.27.1-alpine container_name: tunein-mock working_dir: /app volumes: