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

FROSADO / onecloudriver / 32250422878
81%

Build:
DEFAULT BRANCH: main
Ran 19 Aug 2026 12:05PM UTC
Jobs 1
Files 48
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

19 Aug 2026 12:00PM UTC coverage: 77.707% (-0.7%) from 78.385%
32250422878

push

github

web-flow
Replace global manager variable with dependency injection (issue #5) (#104)

* refactor: replace global manager variable with dependency injection via context

Implements issue #5: replaces the package-level `manager` variable with
context-based dependency injection through Cobra commands, following the
same pattern already used for the graph.Client (issue #10).

Changes:
- Add contextWithManager() and getManager() helpers in common.go
- Remove global manager variable from main.go
- Inject manager into context in PersistentPreRun
- Update all 11 commands to retrieve manager from context via getManager(cmd)
- Update test setup functions to inject manager through context

Benefits:
- Eliminates nil-panic risk from accessing uninitialized global manager
- Improves testability: tests can now inject mock managers without keyring
- Makes dependencies explicit and testable
- Aligns with Cobra best practices

* fix: correct getManager() call in TestResolveAccountNameDefault

The test was incorrectly trying to use getManager(cmd) in a context where
cmd didn't have a manager yet. Now properly retrieves manager from rootCmd
context which was set up by setupManager().

29 of 83 new or added lines in 15 files covered. (34.94%)

6 existing lines in 3 files now uncovered.

4486 of 5773 relevant lines covered (77.71%)

3416.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
31.79
-2.74% cmd/onecloudriver/service.go
10
40.0
-1.94% cmd/onecloudriver/account.go
4
48.39
-1.61% cmd/onecloudriver/main.go
4
23.68
-2.79% cmd/onecloudriver/mkdir.go
4
24.39
-2.64% cmd/onecloudriver/rename.go
2
93.85
-2.58% cmd/onecloudriver/common.go
2
58.82
-0.75% cmd/onecloudriver/copy.go
2
40.3
0.62% cmd/onecloudriver/download.go
2
53.49
-0.36% cmd/onecloudriver/info.go
2
43.24
0.82% cmd/onecloudriver/list.go
2
35.04
-0.04% cmd/onecloudriver/mount.go
2
59.57
-0.89% cmd/onecloudriver/mv.go
2
58.14
-0.83% cmd/onecloudriver/rm.go
2
71.11
-2.06% cmd/onecloudriver/sync.go
2
37.5
0.96% cmd/onecloudriver/upload.go

Coverage Regressions

Lines Coverage ∆ File
2
78.13
-0.57% internal/fs/content_cache.go
2
85.47
-0.69% internal/fs/delta.go
2
84.91
-3.77% internal/graph/children.go
Jobs
ID Job ID Ran Files Coverage
1 32250422878.1 19 Aug 2026 12:05PM UTC 48
77.71
GitHub Action Run
Source Files on build 32250422878
  • Tree
  • List 48
  • Changed 18
  • Source Changed 0
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f900b83a on github
  • Prev Build on main (#32109894159)
  • Next Build on main (#32252059305)
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