Skip to content

Overhaul stats: add E2E tests for the global metrics #1407

@josecelano

Description

@josecelano

Before implementing the segregate metrics I want to add some integration tests for the global metrics.

While I was working on #1404 I realized we don't have integration tests for that. There are tests for a single server. For example:

The tests use the test environment to create a single instance of the HTTP or UDP trackers.

We need to add a new tests at the application level at least with one test for each tracker type:

  • Run the whole tracker with the HTTP tracker enabled.
  • Make an announce request.
  • Get the global metrics from the REST API.
  • Check that the counter for announce request was increased.

Same for UDP tracker.

I don't know yet if we can use an E2E test:

https://github.com/torrust/torrust-tracker/blob/develop/src/console/ci/e2e/runner.rs

Or maybe we can create a new integration tests running the whole app.

I think the first option is faster to implement but slower to execute (it's using docker). I would prefer the second option. If it takes too long I would do it with E2E tests for now. Global metrics is something we are going to remove in future versions and the main app bootstrapping (containers and jobs) is not changed very often.

cc @da2ce7

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions