Skip to content

Only generate mocks that are actually used in tests

Axel von Bertoldi requested to merge avonbertoldi/go-1.18-mocks-cleanup into main

What does this MR do?

This MR changes the way we generate mocks used in tests. We now use go:generate to generate mocks, which lets us more easily generate only the mocks that are actually used in tests.

Why was this MR needed?

When we upgraded to go 1.18, we also had to upgrade to mockery 2.14. The new version of mockery generates a lot more mocks than the older version, none of which were actually used in any tests. This MR cleans things up a bit by only generating mocks that are actually used in tests.

What's the best way to test this MR?

Run the unit and integration tests, or just let the CI pipeline run.

What are the relevant issue numbers?

Edited by Axel von Bertoldi

Merge request reports