fix(test): skip TestRadioBrowserSearch_Real unless RADIOBROWSER_INTEGRATION=1

The test dials all.api.radio-browser.info directly. When the upstream
TLS certificate expires the test fails and blocks the build — the local
codebase has no control over third-party certificate health.

Guard with testing.Short() and an opt-in env var so CI stays green and
the live-network test can still be run explicitly when needed.

Closes #412

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-05-25 21:27:10 +02:00
co-authored by Claude Sonnet 4.6
parent bf3466d5d9
commit 4799eab7e5
+4
View File
@@ -4,6 +4,7 @@ import (
"fmt"
"net/http"
"net/http/httptest"
"os"
"testing"
)
@@ -44,6 +45,9 @@ func TestRadioBrowserSearch(t *testing.T) {
}
func TestRadioBrowserSearch_Real(t *testing.T) {
if testing.Short() || os.Getenv("RADIOBROWSER_INTEGRATION") == "" {
t.Skip("skipping live network test; set RADIOBROWSER_INTEGRATION=1 to run")
}
query := "Deutschlandfunk Kultur"
resp, err := RadioBrowserSearch(query)
if err != nil {