You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are multiple bugs that are not detected by our current CI and unit tests. The stability bugs are especially frequent of those. Unit tests are not well-suited to test the parts of code that call into the OS and especially the ones using networking. An integration testing system is a much better candidate here.
Requirements
Tests the following:
Stability and liveness of carbonapi while processing a set of requests.
Timeout test for a set of typical requests.
(in the future) Correctness test for a set of typical render and find requests.
(in the future) Test a metrics scrape.
Can run automatically for each PR.
Can run in any environment.
Uses mock backends, which:
Are tens in number.
Are split into clusters.
Have replication.
Uses neutral data. E.g. randomly generated data.
Design
System consists of three parts:
HTTP requests player, which will send a set of requests to carbonapi that are defined in advance.
carbonapi itself.
Set of mock backends, which simulate the real-life backends.
In the first version, it makes sense to run them on a single box (it can also be a container) or inside 3 separate containers via docker-compose. Each backend will occupy a port on a single machine.
HTTP player details
There are multiple available. We don't have to write our own. We need to try and choose one.
Mock backends
We will have to implement this part. Mock backends should support the main procol we use for communication with a real backend. They will play back preset responses for each request.
Workflow
The test will run something like this:
Bring up all the systems.
Send a set of requests to carbonapi.
Check if the responses were received.
(in the future) Check correctness of the responses.
(in the future) Try scraping metrics from carbonapi and check if they satisfy basic heuristics.
Check liveness of carbonapi.
The text was updated successfully, but these errors were encountered:
It makes sense to me.
In my opinion, we can start with the HTTP player part and correctness/scrape tests using the normal go-carbon backend, as we have in hurl tests, but without hurl. :)
Then we can spend time on the mock backend and create tests for stability and timeouts.
Motivation
There are multiple bugs that are not detected by our current CI and unit tests. The stability bugs are especially frequent of those. Unit tests are not well-suited to test the parts of code that call into the OS and especially the ones using networking. An integration testing system is a much better candidate here.
Requirements
carbonapi
while processing a set of requests.render
andfind
requests.Design
System consists of three parts:
carbonapi
that are defined in advance.carbonapi
itself.In the first version, it makes sense to run them on a single box (it can also be a container) or inside 3 separate containers via docker-compose. Each backend will occupy a port on a single machine.
HTTP player details
There are multiple available. We don't have to write our own. We need to try and choose one.
Mock backends
We will have to implement this part. Mock backends should support the main procol we use for communication with a real backend. They will play back preset responses for each request.
Workflow
The test will run something like this:
carbonapi
.carbonapi
and check if they satisfy basic heuristics.carbonapi
.The text was updated successfully, but these errors were encountered: