@@ -97,45 +97,6 @@ func TestBuildMCPHTTPServer_RouteBuilderReceivesSessionTimeout(t *testing.T) {
9797 assert .Equal (t , 15 * time .Minute , capturedTimeout )
9898}
9999
100- // TestBuildMCPHTTPServer_HealthEndpointResponds verifies that the /health endpoint
101- // registered by buildMCPHTTPServer returns a successful response.
102- func TestBuildMCPHTTPServer_HealthEndpointResponds (t * testing.T ) {
103- us , err := NewUnified (context .Background (), & config.Config {})
104- require .NoError (t , err )
105- t .Cleanup (func () { us .Close () })
106-
107- server := buildMCPHTTPServer ("127.0.0.1:0" , us , "" , "" , func (_ * http.ServeMux , _ time.Duration ) {})
108-
109- req := httptest .NewRequest (http .MethodGet , "/health" , nil )
110- rr := httptest .NewRecorder ()
111- server .Handler .ServeHTTP (rr , req )
112-
113- assert .Equal (t , http .StatusOK , rr .Code )
114- }
115-
116- // TestBuildMCPHTTPServer_OAuthDiscoveryEndpointResponds verifies that the OAuth
117- // discovery endpoint registered by buildMCPHTTPServer returns 404.
118- func TestBuildMCPHTTPServer_OAuthDiscoveryEndpointResponds (t * testing.T ) {
119- us , err := NewUnified (context .Background (), & config.Config {})
120- require .NoError (t , err )
121- t .Cleanup (func () { us .Close () })
122-
123- server := buildMCPHTTPServer ("127.0.0.1:0" , us , "" , "" , func (_ * http.ServeMux , _ time.Duration ) {})
124-
125- for _ , path := range []string {
126- "/.well-known/oauth-authorization-server" ,
127- "/mcp/.well-known/oauth-authorization-server" ,
128- } {
129- t .Run (path , func (t * testing.T ) {
130- req := httptest .NewRequest (http .MethodGet , path , nil )
131- rr := httptest .NewRecorder ()
132- server .Handler .ServeHTTP (rr , req )
133-
134- assert .Equal (t , http .StatusNotFound , rr .Code )
135- })
136- }
137- }
138-
139100// TestBuildMCPHTTPServer_CustomRouteFromBuilder verifies that routes registered
140101// inside the routeBuilder callback are accessible via the returned server's handler.
141102func TestBuildMCPHTTPServer_CustomRouteFromBuilder (t * testing.T ) {
0 commit comments