fix(coverart/test): use newHTTPClient in provider test fixtures
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user