Skip to content

Commit 798dc9a

Browse files
Copilotlpcox
andauthored
test: address validation feedback on go-sdk canary changes
Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/4d4e8792-d37a-4028-8eaa-15752f44b0d7 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent d19198b commit 798dc9a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

internal/mcp/connection_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,9 @@ func TestPaginateAll(t *testing.T) {
982982
callCount := 0
983983
_, err := paginateAll("server1", "tools", func(cursor string) (paginatedPage[string], error) {
984984
callCount++
985-
nextCursor := cursor + "next"
986-
if nextCursor == "" {
987-
nextCursor = "next"
985+
nextCursor := "next"
986+
if cursor != "" {
987+
nextCursor = cursor + "next"
988988
}
989989
return paginatedPage[string]{Items: []string{"x"}, NextCursor: nextCursor}, nil
990990
})

internal/server/routed_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ func TestRegisterToolWithoutValidation(t *testing.T) {
718718
},
719719
}, func(ctx context.Context, req *sdk.CallToolRequest, state interface{}) (*sdk.CallToolResult, interface{}, error) {
720720
strictHandlerCalled = true
721-
return &sdk.CallToolResult{IsError: false}, nil, nil
721+
return &sdk.CallToolResult{IsError: false}, state, nil
722722
})
723723

724724
// Use in-memory transports to connect a client to the server and invoke the tool

0 commit comments

Comments
 (0)