fix(server): only build core.Agents once

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2025-03-05 14:18:27 -08:00
parent a04167672c
commit 0372339e1b
4 changed files with 15 additions and 8 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ var _ = Describe("Agents", func() {
var ag *Agents
BeforeEach(func() {
conf.Server.Agents = ""
ag = New(ds)
ag = createAgents(ds)
})
It("calls the placeholder GetArtistImages", func() {
@@ -49,7 +49,7 @@ var _ = Describe("Agents", func() {
Register("disabled", func(model.DataStore) Interface { return nil })
Register("empty", func(model.DataStore) Interface { return &emptyAgent{} })
conf.Server.Agents = "empty,fake,disabled"
ag = New(ds)
ag = createAgents(ds)
Expect(ag.AgentName()).To(Equal("agents"))
})