fix: T16 verification cleanups
- golangci-lint: errcheck on resp.Body.Close in Lidarr client + revive unused-parameter in delete_test.go - coverage: 2 error-branch tests added to lidarrquarantine.Service (DeleteFile + DeleteViaLidarr track-not-found paths) bring per-package coverage to 81.4% (target >=80%) - search/tracks.test.ts: same TrackMenu name-collision fix T13 applied to TrackRow.test.ts — exact-string button match instead of regex
This commit is contained in:
@@ -64,6 +64,6 @@ func (c *Client) DeleteAlbum(ctx context.Context, lidarrAlbumID int, deleteFiles
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
resp.Body.Close()
|
||||
_ = resp.Body.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ func TestDeleteAlbum_NetworkErrorReturnsErrUnreachable(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDeleteAlbum_ZeroIDRejected(t *testing.T) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, _ *http.Request) {
|
||||
c, srv := newTestClient(func(_ http.ResponseWriter, _ *http.Request) {
|
||||
t.Error("server should not be called with zero id")
|
||||
})
|
||||
defer srv.Close()
|
||||
|
||||
@@ -18,7 +18,7 @@ func (c *Client) LookupArtistByMBID(ctx context.Context, mbid string) (LidarrArt
|
||||
if err != nil {
|
||||
return LidarrArtist{}, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
var rows []LidarrArtist
|
||||
if err := json.NewDecoder(resp.Body).Decode(&rows); err != nil {
|
||||
@@ -41,7 +41,7 @@ func (c *Client) LookupAlbumByMBID(ctx context.Context, mbid string) (LidarrAlbu
|
||||
if err != nil {
|
||||
return LidarrAlbum{}, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
var rows []LidarrAlbum
|
||||
if err := json.NewDecoder(resp.Body).Decode(&rows); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user