fix(coverart/test): use newHTTPClient in provider test fixtures

This commit is contained in:
2026-05-08 07:58:00 -04:00
parent 038d737ae7
commit 1ad966b7f3
3 changed files with 13 additions and 13 deletions
@@ -28,7 +28,7 @@ func newTheAudioDBProviderForTest(t *testing.T, mockURL string) *theAudioDBProvi
withTheAudioDBBaseURL(t, mockURL)
p := &theAudioDBProvider{
client: &http.Client{Timeout: 5 * time.Second},
client: newHTTPClient(httpClientOptions{Name: "theaudiodb", HTTPClient: &http.Client{Timeout: 5 * time.Second}, TreatAuthAsTransient: true, BaseBackoff: time.Millisecond}),
}
Register(p)
p.enabled.Store(true)
@@ -234,7 +234,7 @@ func TestTheAudioDB_DefaultsToTestKeyOnEmpty(t *testing.T) {
defer resetRegistryForTests()
withTheAudioDBBaseURL(t, srv.URL)
p := &theAudioDBProvider{client: &http.Client{Timeout: 5 * time.Second}}
p := &theAudioDBProvider{client: newHTTPClient(httpClientOptions{Name: "theaudiodb", HTTPClient: &http.Client{Timeout: 5 * time.Second}, TreatAuthAsTransient: true, BaseBackoff: time.Millisecond})}
Register(p)
// Configure with empty key — should fall back to test key.
if err := p.Configure(ProviderSettings{Enabled: true, APIKey: ""}); err != nil {