fix(server/m7-cover-sources): forward-fix CI — unused-parameter lint
revive's unused-parameter rule flagged 7 test handler/method args: - provider_test.go: fakeProvider.Configure(s) and fakeAlbumProvider.FetchAlbumCover(ctx, mbid) — interface conformance dummies that don't use their args. - provider_mbcaa_test.go: 4 httptest handlers that ignore one or both of (w, r). - provider_theaudiodb_test.go: the disabled-provider negative test's httptest handler. All 7 renamed to _ per revive's convention.
This commit is contained in:
@@ -69,7 +69,7 @@ func TestMBCAAProvider_FetchAlbumCover_Success(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMBCAAProvider_FetchAlbumCover_NotFound(t *testing.T) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||
http.Error(w, "not found", http.StatusNotFound)
|
||||
}))
|
||||
defer srv.Close()
|
||||
@@ -82,7 +82,7 @@ func TestMBCAAProvider_FetchAlbumCover_NotFound(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMBCAAProvider_FetchAlbumCover_DisabledReturnsNotFound(t *testing.T) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {
|
||||
t.Error("server should not be hit when provider is disabled")
|
||||
}))
|
||||
defer srv.Close()
|
||||
@@ -117,7 +117,7 @@ func TestMBCAAProvider_Configure_TogglesEnabled(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMBCAAProvider_TestConnection_TreatsNotFoundAsSuccess(t *testing.T) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||
http.Error(w, "not found", http.StatusNotFound)
|
||||
}))
|
||||
defer srv.Close()
|
||||
@@ -129,7 +129,7 @@ func TestMBCAAProvider_TestConnection_TreatsNotFoundAsSuccess(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMBCAAProvider_TestConnection_PropagatesTransient(t *testing.T) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||
http.Error(w, "boom", http.StatusInternalServerError)
|
||||
}))
|
||||
defer srv.Close()
|
||||
|
||||
Reference in New Issue
Block a user