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

opendefensecloud / solution-arsenal / 27603219851
75%

Build:
DEFAULT BRANCH: main
Ran 16 Jun 2026 08:16AM UTC
Jobs 1
Files 62
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

16 Jun 2026 08:02AM UTC coverage: 76.672% (+2.3%) from 74.353%
27603219851

push

github

web-flow
test: fix coverage filter and cover api/solar REST boilerplate + render funcs (#602)

## What
Fix the `make test` coverage-exclusion filter so it only excludes
generated code, and add the tests that this exposes were missing in
`api/solar` and `pkg/renderer`.

## Why
The coverage filter in the Makefile used `grep -v /solar/api`, which
matches the entire `api/solar` import path (it contains the literal
substring `/solar/api`) and therefore excluded ~900 statements of
hand-written, already-tested REST code from the reported coverage - not
just the generated `zz_generated*.go` files it was meant to exclude.
Narrowing the filter to `zz_generated` correctly excludes only generated
code, but this also dropped the headline coverage number because
`api/solar`'s REST boilerplate
(`NamespaceScoped`/`New`/`NewList`/`GetGroupResource`/`PrepareForCreate`/`PrepareForUpdate`/etc.)
and `pkg/renderer/funcs.go`'s template helpers had no tests at all. This
PR adds both.

## Testing
- `make test` - all 17 Ginkgo suites pass.
- `api/solar` (excluding generated code) goes from 16.7% to 81.4%
coverage via the new table-driven `api/solar/rest_test.go`, covering all
12 resource types' REST storage boilerplate, `CopyStatusTo`,
`Registry.GetURL`, `RenderResult.Close`, and `register.go`.
- `pkg/renderer/funcs.go` goes from 0% to 100% coverage via the new
`pkg/renderer/funcs_test.go`, covering the YAML/JSON template helper
functions.
- Overall reported coverage moves from ~69% (after the filter fix alone)
to 75.6%.

## Notes for reviewers
The remaining 0%-covered items in `api/solar`
(`Validate`/`ValidateUpdate`/`ConvertToTable` for `Registry`,
`RenderArtifact`, `RenderBinding`, and `RenderTask`) and the
cross-namespace `Registry`/`ReferenceGrant` paths in
`pkg/controller/target_controller.go` are intentionally left for a
follow-up issue.

## Checklist
- [x] Tests added/updated
- [x] No breaking changes (or upgrade path documented above)
- [x] Readable commit history (squashed an... (continued)

3599 of 4694 relevant lines covered (76.67%)

28.11 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
77.91
0.39% pkg/controller/profile_controller.go
2
86.52
-0.45% pkg/controller/rendertask_controller.go
Jobs
ID Job ID Ran Files Coverage
1 27603219851.1 16 Jun 2026 08:16AM UTC 62
76.67
GitHub Action Run
Source Files on build 27603219851
  • Tree
  • List 62
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27603219851
  • 39b1e5c4 on github
  • Prev Build on main (#27539645700)
  • Next Build on main (#27607596902)
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