-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requestpythonImprovements or additions to python source codeImprovements or additions to python source code
Description
Description
Purpose of this ticket is to create (narrow) integration tests. Currently exporter library is supporting unittests.
Basic steps for the integration tests (via docker-compose):
- Startup the prometheus exporter with any other dependency (mockserver as Github)
- Use a library like prometheus-api-client to make http requests towards the exporter endpoint.
- Mock the Github ~ set expectations for rate-limits per authentication type.
- Verify that the returned metrics are as expected by comparing them to a pre-defined set of expected values.
- Repeat steps 3-4 for different scenarios, such as different input parameters or different configuration of the exporter.
- Stop the prometheus exporter service and any dependencies that were started from step
.1
Folder structure with integration tests (via pytest)
tests
|-----integration_tests
|-----unittestsUpdate tox.ini
Separation of unit and integration tests in order to easily executed, in CI integration an unit test shall be executed in parallel.
Example:
[testenv:unittests]
description = Python unittests
``
```ini
[testenv:integration_tests]
description = Python integration testsCI:
tox -e unittests,integration_testsReferences
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpythonImprovements or additions to python source codeImprovements or additions to python source code