Skip to content

Commit 915bd83

Browse files
committed
Remove unnecessary tests
1 parent 7e58bdf commit 915bd83

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

internal/client/client_session_test.go

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -114,59 +114,6 @@ func TestAddToMCPServerWithSession(t *testing.T) {
114114
mockClient.AssertExpectations(t)
115115
})
116116

117-
t.Run("nil session falls back to global tools", func(t *testing.T) {
118-
mockClient := new(testutil.MockMCPClient)
119-
mockServer := server.NewMCPServer("test", "1.0")
120-
mockTokenStore := new(testutil.MockUserTokenStore)
121-
122-
client := &Client{
123-
name: "test-client",
124-
needManualStart: false,
125-
client: mockClient,
126-
}
127-
128-
mockClient.On("Initialize", ctx, mock.AnythingOfType("mcp.InitializeRequest")).
129-
Return(&mcp.InitializeResult{
130-
ProtocolVersion: mcp.LATEST_PROTOCOL_VERSION,
131-
ServerInfo: mcp.Implementation{Name: "test-server", Version: "1.0"},
132-
}, nil)
133-
134-
tools := []mcp.Tool{
135-
{Name: "tool1", Description: "Test tool 1"},
136-
{Name: "tool2", Description: "Test tool 2"},
137-
}
138-
listToolsResult := &mcp.ListToolsResult{}
139-
listToolsResult.Tools = tools
140-
mockClient.On("ListTools", ctx, mock.AnythingOfType("mcp.ListToolsRequest")).
141-
Return(listToolsResult, nil).Once()
142-
143-
mockClient.On("ListPrompts", ctx, mock.AnythingOfType("mcp.ListPromptsRequest")).
144-
Return(&mcp.ListPromptsResult{}, nil)
145-
mockClient.On("ListResources", ctx, mock.AnythingOfType("mcp.ListResourcesRequest")).
146-
Return(&mcp.ListResourcesResult{}, nil)
147-
mockClient.On("ListResourceTemplates", ctx, mock.AnythingOfType("mcp.ListResourceTemplatesRequest")).
148-
Return(&mcp.ListResourceTemplatesResult{}, nil)
149-
150-
err := client.AddToMCPServerWithSession(
151-
ctx,
152-
clientInfo,
153-
mockServer,
154-
"user@example.com",
155-
false,
156-
mockTokenStore,
157-
"test-server",
158-
"http://localhost",
159-
nil,
160-
nil,
161-
)
162-
163-
require.NoError(t, err)
164-
mockClient.AssertExpectations(t)
165-
// Check that tools were added to the server
166-
// Note: We can't directly verify AddTool calls on the real server
167-
// but the test verifies no error occurred
168-
})
169-
170117
t.Run("tool filtering with session", func(t *testing.T) {
171118
mockClient := new(testutil.MockMCPClient)
172119
mockServer := server.NewMCPServer("test", "1.0")

0 commit comments

Comments
 (0)