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:
Ettore Di Giacinto committed 2026-11-03 09:21:06 +00:00
1 parent c1f697b472
commit d01e3cc63b
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")