Verified Commit 52a91d9e authored by
Exclude mock files from coverage reporting
Runner's codebase contains a lot of mock files. They are used only for tests and not for the production use. Unfortunately, because the files are not named as *_test.go - to allow use the mocks in tests outside of the mock source package - they are counted to the coverage report. We're using https://github.com/vektra/mockery to automatically generate mock files basing on interfaces. Mockery is creating mocks, that accept both scalar values as well as functions that accept mocked method argumets and returns mocked method result. However, we're mostly not using this mocking mechanism. Finally this ends in a lot of mocks code being not covered in test, which decreases the overall coverage value. While we're totally not interested in having coverage for mocks! This commit aims to remove all mocks from the coverage profile file, which should remove them from both percentage value calculation and the HTML/jUnit reports.
Showing with 1 addition and 1 deletion