influxdata / influxdata/influxdb
unit test: query: runQuery
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
#### Background
[`runQuery`](https://github.com/influxdata/influxdb/blob/master/ui/src/shared/apis/query.ts#L36-L179) handles executing a query: making a request and processing the response.
Most of the logic of the method is involved in response handling, which are handled by private methods. Testing this method will involve faking a request and triggering a response to cause specific conditions in response and error handlers to be triggered
#### Acceptance Criteria
When looking through the possible code paths, these areas should be covered with tests:
- `processResponse`
- [ ] `processSuccessResponse`
- [ ] `reader.read()`
- [ ] loop with `trimPartialLines()`
- [ ] `processRateLimitResponse`
- `processErrorResponse`
- [ ] parseable error
- [ ] unknown error
Contributor guide
Assessment
This issue has not been assessed yet.