Skip to content

Commit 596207d

Browse files
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

File tree

acceptance/bundle/debug/list-targets/databricks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ targets:
1515
mode: development
1616
workspace:
1717
host: https://dev.example.com
18-
staging: {}
18+
staging:
1919
prod:
2020
mode: production
2121
workspace:

0 commit comments

Comments
 (0)