Skip to content

Commit b7301ff

Browse files
janiszclaude
andcommitted
Fix linter issues in test_helpers.go
- Add blank identifier for ignored Close error in cleanup - Split long function signature across multiple lines Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 98cb1a3 commit b7301ff

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

internal/testutil/test_helpers.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ import (
88
"github.com/stretchr/testify/require"
99
)
1010

11-
// SetupInitializedClient creates an initialized MCP client for testing with automatic cleanup.
1211
func SetupInitializedClient(t *testing.T, createClient func(*testing.T) (*MCPTestClient, error)) *MCPTestClient {
1312
t.Helper()
1413

1514
client, err := createClient(t)
1615
require.NoError(t, err, "Failed to create MCP client")
17-
t.Cleanup(func() { client.Close() })
16+
t.Cleanup(func() { _ = client.Close() })
1817

1918
return client
2019
}
2120

22-
// CallToolAndGetResult calls a tool and verifies it succeeds.
23-
func CallToolAndGetResult(t *testing.T, client *MCPTestClient, toolName string, args map[string]any) *mcp.CallToolResult {
21+
func CallToolAndGetResult(
22+
t *testing.T,
23+
client *MCPTestClient,
24+
toolName string,
25+
args map[string]any,
26+
) *mcp.CallToolResult {
2427
t.Helper()
2528

2629
ctx := context.Background()
@@ -31,7 +34,6 @@ func CallToolAndGetResult(t *testing.T, client *MCPTestClient, toolName string,
3134
return result
3235
}
3336

34-
// GetTextContent extracts text from the first content item.
3537
func GetTextContent(t *testing.T, result *mcp.CallToolResult) string {
3638
t.Helper()
3739
require.NotEmpty(t, result.Content, "should have content in response")

0 commit comments

Comments
 (0)