Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/server/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,11 @@ func TestCreateHTTPServerForMCP_Close(t *testing.T) {

// Verify response based on error expectation
if tt.wantError {
if tt.wantStatusCode == http.StatusMethodNotAllowed {
switch tt.wantStatusCode {
case http.StatusMethodNotAllowed:
// http.Error writes plain text for 405
assert.Contains(t, w.Body.String(), "Method not allowed")
} else if tt.wantStatusCode == http.StatusUnauthorized {
case http.StatusUnauthorized:
assert.Contains(t, w.Body.String(), "Unauthorized")
}
} else {
Expand Down