mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
Make the BMX TuneIn integration tests independent of the live TuneIn (radiotime.com) service, the same way Spotify/Amazon are already mocked. - pkg/service/bmx: the TuneIn upstream base URLs become configurable vars with a SetTuneInEndpoints(opmlBase, apiBase) setter that also registers the host in the outbound allowlist. Defaults are unchanged (real radiotime hosts), so production behaviour is identical; tests can redirect to a mock. - cmd/soundtouch-service: new --tunein-opml-url / --tunein-api-url flags (TUNEIN_OPML_URL / TUNEIN_API_URL) wired through to SetTuneInEndpoints. - cmd/mock-tunein + pkg/testutils/tunein: a mock TuneIn server serving Tune.ashx (stream URLs) and describe.ashx (name/logo) with RFC-5737 values; unmocked endpoints 404 so a test needing them fails loudly. - docker-compose.ci.yml: add the tunein-mock service and point the service at it. - tunein_playback_station.http now asserts the mock-served stream URL + name, proving the path is offline. tunein_favorite.http covers the local-only favorite add/remove (202). - TUNEIN-MOCK-MISSING.md lists the upstream captures still needed (episode / navigate / search) before those routes can be mocked + tested. make test-http-client: 61 requests, 0 failed. golangci-lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>