Skip to content

Commit 1af86dd

Browse files
committed
fixed: incorrect protocol version, bump foxy contexts
1 parent 90e680f commit 1af86dd

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23.8
44

55
require (
66
github.com/stretchr/testify v1.10.0
7-
github.com/strowk/foxy-contexts v0.1.0-beta.4
7+
github.com/strowk/foxy-contexts v0.1.0-beta.5
88
go.uber.org/fx v1.23.0
99
go.uber.org/mock v0.5.1
1010
go.uber.org/zap v1.27.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
9696
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
9797
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
9898
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
99-
github.com/strowk/foxy-contexts v0.1.0-beta.4 h1:H7k4ntAKRwerAJ27ytPZMRyOQqzCd6beNIes4tDktpg=
100-
github.com/strowk/foxy-contexts v0.1.0-beta.4/go.mod h1:naFjuYZ4disAfLf0UDYYyjWgPjQIyLqOvxQ56AvcFfc=
99+
github.com/strowk/foxy-contexts v0.1.0-beta.5 h1:Jizc8LfhRws0JpvDuWbHcKQhodTgQdvTjTnUnEUnuiU=
100+
github.com/strowk/foxy-contexts v0.1.0-beta.5/go.mod h1:Xcg+JP0aJ18RhSl3oGMyptbiSVNC0cxlAY452t8uWG4=
101101
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
102102
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
103103
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=

main_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ func TestWithAllowedContexts(t *testing.T) {
4242
ts.AssertNoErrors(cntrl)
4343
}
4444

45+
func TestInitialize(t *testing.T) {
46+
ts, err := foxytest.Read("testdata/initialize")
47+
if err != nil {
48+
t.Fatal(err)
49+
}
50+
ts.WithLogging()
51+
ts.WithExecutable("go", []string{"run", "main.go"})
52+
cntrl := foxytest.NewTestRunner(t)
53+
ts.Run(cntrl)
54+
ts.AssertNoErrors(cntrl)
55+
}
56+
4557
func TestLists(t *testing.T) {
4658
ts, err := foxytest.Read("testdata")
4759
if err != nil {

testdata/initialize/init_test.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
case: "Initialize"
2+
3+
in:
4+
{
5+
"jsonrpc": "2.0",
6+
"id": 1,
7+
"method": "initialize",
8+
"params":
9+
{
10+
"protocolVersion": "2024-11-05",
11+
"capabilities": { "roots": { "listChanged": true } },
12+
"clientInfo": { "name": "Test client", "version": "0.0.42" },
13+
},
14+
}
15+
out:
16+
{
17+
"jsonrpc": "2.0",
18+
"result":
19+
{
20+
"capabilities":
21+
{
22+
"prompts": { "listChanged": false },
23+
"resources": { "listChanged": false, "subscribe": false },
24+
"tools": { "listChanged": false },
25+
},
26+
"protocolVersion": "2024-11-05",
27+
"serverInfo": { "name": "mcp-k8s-go", "version": "0.0.1" },
28+
},
29+
"id": 1,
30+
}
31+
---
32+
in: { "method": "notifications/initialized", "jsonrpc": "2.0" }

0 commit comments

Comments
 (0)