Commit 596207d
authored
test: cover nil target entries in bundle debug list-targets (#5206)
## Summary
- Follow-up to #5203. Adds a unit test for `collectTargets` that
exercises the nil-entry path so the regression is locked in.
- Test stays at the function level because no YAML pattern I tried
produces a nil `*config.Target` entry through the loader pipeline
(`staging:`, `staging: null`, `staging: ~`, `staging: {}` all yield
non-nil entries). Direct unit coverage is the practical guard.
## Test plan
- [ ] `go test ./cmd/bundle/debug -run
TestCollectTargetsHandlesNilEntries` passes.
- [ ] Reverting the nil guard in `collectTargets` makes the test fail
with a nil pointer dereference.1 parent 896ac8d commit 596207d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments