Skip to content

Unit test for api_collector #1656

@klesh

Description

@klesh

Description

Now we have 400 lines of code for api_collector, it become quite complicated and error-prone, plus, we have already found multiple bugs during v0.10 testing.

Describe the solution you'd like

Build an unit-test for api_collector to cover all possible routes with mocking github.com/stretchr/testify/mock techinque.
IMPORTANT: should not be any actual database operation / api request get performed when running test-cases

Has the Feature been Requested Before?

Metadata

Metadata

Assignees

Labels

type/testThis issue is to test plugins or features

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions