(t *testing.T)
| 51 | } |
| 52 | |
| 53 | func TestSearchAPIByServiceNotFound(t *testing.T) { |
| 54 | profile := &config.Profile{Mode: common.ReleaseModeDev} |
| 55 | s, err := NewServer(nil, profile, "test-secret") |
| 56 | require.NoError(t, err) |
| 57 | |
| 58 | // Test browsing a non-existent service |
| 59 | result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{ |
| 60 | Service: "NonExistentService", |
| 61 | }) |
| 62 | require.NoError(t, err) |
| 63 | require.NotNil(t, result) |
| 64 | require.Len(t, result.Content, 1) |
| 65 | |
| 66 | text := result.Content[0].(*mcpsdk.TextContent).Text |
| 67 | require.Contains(t, text, "No endpoints found") |
| 68 | require.Contains(t, text, "Available services") |
| 69 | } |
| 70 | |
| 71 | func TestSearchAPIDetailMode(t *testing.T) { |
| 72 | profile := &config.Profile{Mode: common.ReleaseModeDev} |
nothing calls this directly
no test coverage detected