mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-01 07:21:17 +00:00
chore(artwork): generic 500 bodies on refresh endpoint, trim stale test comments
This commit is contained in:
parent
dfd4bec270
commit
c2d7ae773c
@ -1,7 +1,6 @@
|
||||
// Package e2e exercises the artwork pipeline end to end against the NEW acquisition→serve
|
||||
// path: it enqueues real entities, drives the real Worker to drain the queue, and serves the
|
||||
// result through the real Service, over a real ImageStore and real library files. It replaces
|
||||
// the legacy core/artwork/e2e suite that was removed with the old readers in the serving cutover.
|
||||
// Package e2e exercises the artwork pipeline end to end: it enqueues real entities, drives the
|
||||
// real Worker to drain the queue, and serves the result through the real Service, over a real
|
||||
// ImageStore and real library files.
|
||||
package e2e
|
||||
|
||||
import (
|
||||
|
||||
@ -34,14 +34,14 @@ func (api *Router) refreshArtwork() http.HandlerFunc {
|
||||
}
|
||||
if err := api.ds.Artwork(ctx).DeleteForItem(kind, id); err != nil {
|
||||
log.Error(ctx, "Error clearing artwork state", "kind", kind, "id", id, err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
item := model.ArtworkQueueItem{ItemKind: kind, ItemID: id, ImageType: model.ImageTypePrimary,
|
||||
Priority: model.ArtworkPriorityBump}
|
||||
if err := api.ds.ArtworkQueue(ctx).Enqueue(item); err != nil {
|
||||
log.Error(ctx, "Error enqueuing artwork refresh", "kind", kind, "id", id, err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
|
||||
@ -45,8 +45,7 @@ import (
|
||||
|
||||
// The artwork serving path streams folder-backed originals via os.Open, which a fake FS cannot
|
||||
// back, so this suite scans a small REAL on-disk library and drives the real acquisition worker
|
||||
// and artwork.Service through the Subsonic and public image handlers. It restores the Task 11
|
||||
// full-pipeline coverage (album found/absent + suffix transition + share/img) against the new path.
|
||||
// and artwork.Service through the Subsonic and public image handlers.
|
||||
var _ = Describe("Artwork Serving", Ordered, func() {
|
||||
var (
|
||||
artRouter *subsonic.Router
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user