• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / minder / 8816020947 / 1
53%
main: 53%

Build:
DEFAULT BRANCH: main
Ran 24 Apr 2024 11:57AM UTC
Files 176
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Apr 2024 11:49AM UTC coverage: 49.754% (-0.005%) from 49.759%
8816020947.1

push

github

web-flow
Use `go generate` directives for mock generation (#3159)

Instead of adding commands to the Makefile, use go generate directives in the files which contain the interfaces we want to mock. This approach has the following advantages:

    Less context switching: you can declare the need for a mock in the
    code and not have to edit the makefiles.
    The same directive can be reused everywhere - you no longer need to
    specify the filepath, interface name and the path to the generated
    mock.
    If the interface is renamed or moved, the code generation will still
    work without modification.

I have left some commands in the makefile for generating mocks from code in pkg, and from autogenerated code. We could in theory get rid of these usages as well, but I did not feel there was much point at this time since they are edge cases.

You may note that there are a lot of additional lines of code: this is because I'm using the "source" mode of mockgen instead of the "reflect" mode. The source mode will generate mocks for all interfaces in the file, and not just the specified ones. However, it does so much quicker than the reflect mode - make gen now takes about half the time it did previously.

8784 of 17655 relevant lines covered (49.75%)

37.52 hits per line

Source Files on job 8816020947.1
  • Tree
  • List 0
  • Changed 20
  • Source Changed 11
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8816020947
  • dfe0916b on github
  • Prev Job for on main (#8812329410.1)
  • Next Job for on main (#8817025717.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc