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

NVIDIA / gpu-operator / 33575743808
44%
main: 45%

Build:
Build:
LAST BUILD BRANCH: pull-request/3089
DEFAULT BRANCH: main
Ran 02 Sep 2026 12:38AM 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

02 Sep 2026 12:30AM UTC coverage: 43.965% (+6.0%) from 37.917%
33575743808

push

github

abrarshivani
Add unit tests for internal/state

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>

5700 of 12965 relevant lines covered (43.96%)

0.44 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33575743808.1 02 Sep 2026 12:38AM UTC 75
43.96
GitHub Action Run
Source Files on build 33575743808
  • 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 #33575743808
  • 142c46d2 on github
  • Prev Build on main (#33562864895)
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