File tree Expand file tree Collapse file tree 4 files changed +47
-3
lines changed Expand file tree Collapse file tree 4 files changed +47
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ go 1.23.8
4
4
5
5
require (
6
6
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
8
8
go.uber.org/fx v1.23.0
9
9
go.uber.org/mock v0.5.1
10
10
go.uber.org/zap v1.27.0
Original file line number Diff line number Diff line change @@ -96,8 +96,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
96
96
github.com/stretchr/testify v1.8.1 /go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4 =
97
97
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA =
98
98
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 =
101
101
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw =
102
102
github.com/valyala/bytebufferpool v1.0.0 /go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc =
103
103
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo =
Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ func TestWithAllowedContexts(t *testing.T) {
42
42
ts .AssertNoErrors (cntrl )
43
43
}
44
44
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
+
45
57
func TestLists (t * testing.T ) {
46
58
ts , err := foxytest .Read ("testdata" )
47
59
if err != nil {
Original file line number Diff line number Diff line change
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" }
You can’t perform that action at this time.
0 commit comments