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

NVIDIA / gpu-operator / 34305024869
44%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2026 03:00AM UTC
Jobs 1
Files 75
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

09 Sep 2026 02:53AM UTC coverage: 44.026% (+6.0%) from 37.979%
34305024869

push

github

web-flow
Add unit tests for internal/state (#2658)

Covers the package at 93.9% of statements. Tests only, no production
source changed.

The tests use the controller-runtime fake client with interceptor.Funcs
to inject Get/List/Create/Update/Delete failures, a fake manager, a fake
REST mapper, and the real manifest renderer, so the error paths exercise
real behaviour rather than restating the implementation.

A few blocks encode behaviour that looks questionable but is out of scope
for a tests-only change, so they are pinned by characterization tests
instead: isDaemonSetReady does not re-check ObservedGeneration on the
nonzero-desired path, isDeploymentReady does not require Status.Replicas
to equal desired, and deleteStateRelatedObjects treats a Forbidden List
as nothing to clean up on the invariant that the operator cannot have
created objects of a kind it cannot list. Each is asserted so that
closing the gap later fails the test and becomes a conscious decision.

Some paths are not reachable from a unit test and are left uncovered:
the predicate closure inside GetWatchSources only runs under a live
informer, and the NewManager and newNVIDIADriverStates success returns
need the hardcoded /opt/gpu-operator/manifests/state-driver path, which
is a string literal rather than an overridable var.

go fix is applied to these files, so they use new(x) over ptr.To(x) and
any over interface{}. It is limited to the files added here; running it
across the repo rewrites 48 files including production sources, which
belongs in its own pass.

Signed-off-by: Abrar Shivani <ashivani@nvidia.com>

5708 of 12965 relevant lines covered (44.03%)

0.44 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34305024869.1 09 Sep 2026 03:00AM UTC 75
44.03
GitHub Action Run
Source Files on build 34305024869
  • Tree
  • List 75
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34305024869
  • 39048175 on github
  • Prev Build on main (#34248263199)
  • Next Build on main (#34381490921)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc