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

stacklok / minder / 8816020947
53%

Build:
DEFAULT BRANCH: main
Ran 24 Apr 2024 11:57AM UTC
Jobs 1
Files 176
Run time 1min
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

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

Jobs
ID Job ID Ran Files Coverage
1 8816020947.1 24 Apr 2024 11:57AM UTC 0
49.75
GitHub Action Run
Source Files on build 8816020947
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #8816020947
  • dfe0916b on github
  • Prev Build on main (#8812329410)
  • Next Build on main (#8817025717)
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