test(http-client): tunein_playback_station now expects 200 without auth

Mirrors the auth-gate relaxation in a213b68. The first request in
tunein_playback_station.http (no Authorization header) previously
asserted 401 + the "Unauthorized" body markup; the gate now logs
instead of 401, so the request returns 200 with the same audio
payload the second (authorized) request gets.

Comment above the request points back to handlers_bmx.go so a future
contributor restoring the gate sees what to flip back. The
test-http-client target is what catches drift here — without this
update, CI's http-client step would fail on the first assertion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-05-17 15:05:39 +02:00
co-authored by Claude Opus 4.7
parent 0038db35d3
commit a7f90f4151
@@ -1,4 +1,8 @@
### GET /bmx/tunein/v1/playback/station/_station_
### GET /bmx/tunein/v1/playback/station/_station_ (no Authorization)
### Auth gate temporarily disabled — see handlers_bmx.go (writeBMXUnauthorized
### is kept as the future-restore point). When the gate is re-enabled,
### swap the 200/audio assertions below back to the 401/Unauthorized ones
### that were here historically.
GET {{host}}/bmx/tunein/v1/playback/station/_station_
Accept: */*
Accept-Language: en
@@ -7,13 +11,13 @@ X-Bmx-Device-Id: bmx-device-id-dummy
User-Agent: Bose_Lisa/27.0.6
> {%
client.test("Response is 401 Unauthorized", function() {
client.assert(response.status === 401, "Response status is not 401");
client.test("Response is 200 OK (auth gate temporarily disabled)", function() {
client.assert(response.status === 200, "Response status is not 200");
});
client.test("Response body contains 'Unauthorized'", function() {
client.assert(response.body.includes("401 Unauthorized"), "Response body does not contain '401 Unauthorized'");
client.assert(response.body.includes("No access token found."), "Response body does not contain 'No access token found.'");
client.test("Response contains audio information", function() {
client.assert(response.body.hasOwnProperty("audio"), "Response missing 'audio'");
client.assert(response.body.audio.hasOwnProperty("streamUrl"), "Response missing 'streamUrl'");
});
%}