loader panic
nicks opened this issue · comments
Nick Santos commented
Add the following test to loader_test:
func TestBadServiceConfig(t *testing.T) {
yaml := `name: scratch
services:
redis:
image: redis:6.2.6-alpine
network_mode: bridge
networks:
gratheon: null
networks:
gratheon:
name: scratch_gratheon
`
_, _ = LoadWithContext(context.Background(), types.ConfigDetails{
ConfigFiles: []types.ConfigFile{
{
Content: []byte(yaml),
},
},
})
}
Expected result:
Loader emits a reasonable error
Actual result:
Loader panics
--- FAIL: TestBadServiceConfig (0.00s)
panic: assignment to entry in nil map [recovered]
panic: assignment to entry in nil map
Nick Santos commented
distilled from tilt-dev/tilt#6249