(t *testing.T)
| 124 | } |
| 125 | |
| 126 | func TestSearchAPIDetailModeNotFound(t *testing.T) { |
| 127 | profile := &config.Profile{Mode: common.ReleaseModeDev} |
| 128 | s, err := NewServer(nil, profile, "test-secret") |
| 129 | require.NoError(t, err) |
| 130 | |
| 131 | // Test detail mode with unknown operationId |
| 132 | result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{ |
| 133 | OperationID: "unknown.operation.id", |
| 134 | }) |
| 135 | require.NoError(t, err) |
| 136 | require.NotNil(t, result) |
| 137 | require.Len(t, result.Content, 1) |
| 138 | |
| 139 | text := result.Content[0].(*mcpsdk.TextContent).Text |
| 140 | require.Contains(t, text, "Unknown operationId") |
| 141 | } |
| 142 | |
| 143 | func TestSearchAPIServiceShowsAll(t *testing.T) { |
| 144 | profile := &config.Profile{Mode: common.ReleaseModeDev} |
nothing calls this directly
no test coverage detected