mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 04:23:15 -05:00
test(chats): avoid a misleading tool variable
Name the MCP tool explicitly so the Ginkgo-only lint rule does not mistake its Run method for testing.T.Run. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 file changed
+3
-3
@@ -59,9 +59,9 @@ func runSlow(a *Application, url string) (string, error) {
|
||||
_, err := a.StudioMCPConnectors().Create(ctx, "u1", mcpconns.Input{Name: "Slow", Transport: mcpconns.TransportHTTP, URL: url, Enabled: true})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
tools, _ := a.StudioMCPConnectors().Resolve(ctx, "u1", nil, true)
|
||||
for _, t := range tools {
|
||||
if t.Name == "slow" {
|
||||
return t.Run(ctx, json.RawMessage(`{"text":"x"}`))
|
||||
for _, tool := range tools {
|
||||
if tool.Name == "slow" {
|
||||
return tool.Run(ctx, json.RawMessage(`{"text":"x"}`))
|
||||
}
|
||||
}
|
||||
Fail("the connector offers no tool slow")
|
||||
|
||||
Reference in new issue
Block a user