Commit 12eb224
committed
test(patch): tighten single.go unit coverage
Replace overlapping package-type tests in single_test.go with focused single-arch coverage and move the unique parsePkgTypes edge cases into patch_validation_test.go. Strengthen loader error assertions, add setupWorkingFolder failure coverage, and cover report parsing plus no-updates guardrails before BuildKit is involved.
Coverage achieved on single.go: 67.4%.
New test functions:
- TestSetupWorkingFolderReturnsTempDirCreationError
- TestSetupWorkingFolderReturnsEnsurePathErrors
- TestPatchSingleArchImageReturnsReportParseError
- TestPatchSingleArchImageReturnsNoUpdatesFoundAfterFiltering
Strengthened test:
- TestLoadImageToRuntimeReturnsLoaderCreationErrors now verifies io.PipeReader CloseWithError propagation
No production code changed.
Signed-off-by: Omer <omer@descope.com>1 parent ae878ee commit 12eb224
2 files changed
Lines changed: 411 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
117 | 129 | | |
118 | 130 | | |
119 | 131 | | |
| |||
0 commit comments