influxdata / influxdata/influxdb

unit test: query: runQuery

Open
#18,754 0 comments 0 reactions 1 assignee Assigned to @hoorayimhelping View on GitHub
team/ui
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.