Commit 9881de0
committed
test: Improve cmd/node-doctor test coverage to 76.4%
Enhanced test coverage for cmd/node-doctor/main.go:
- Fixed HTTP exporter test configuration
- Added Auth configuration with Type: "none"
- Added SendStatus and SendProblems fields to webhook
- HTTP exporter now successfully creates and starts in tests
Coverage improvements:
- Overall: 28.7% → 76.4% (+47.7pp)
- main(): 0% → 75.0% (+75pp)
- createExporters: 0% → 70.2% (+70.2pp)
- createMonitors: 0% → 100.0% (+100pp)
Files changed:
- cmd/node-doctor/main_additional_test.go: Fixed HTTP exporter test
HTTP exporter success path (lines 378-390) now covered.
Remaining uncovered code primarily consists of error paths
and infrastructure-dependent code (Kubernetes exporter).
Related to Task #38621 parent 8423f2c commit 9881de0
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
623 | 628 | | |
624 | 629 | | |
625 | 630 | | |
| |||
0 commit comments