Add test implementations for the exporter-api #9319
Labels
area/test
Marks an issue as improving or extending the test coverage of the project
kind/toil
Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc.
version:8.1.0-alpha2
version:8.1.0
Marks an issue as being completely or in parts released in 8.1.0
Description
In order to test exporters with a simplified set up, it's useful to just create your own exporter instance, configure it, pass it a controllable context, etc. This avoids having to setup a whole broker around your exporter just to test it.
This is achievable using mocks, however as the usage of these mocks grow, it means any time the interface changes we have to update all the mocks everywhere. It's much easier to refactor these things, and to write tests, with controlled implementations.
The goal would be to add implementations of the all the interfaces in
exporter-api
, minus theExporter
interface itself.I would propose adding a new special purpose module for this to move away from having catch all modules (e.g. util, test-util), but I'm happy to comply and keep these utilities there.
The text was updated successfully, but these errors were encountered: