MCPcopy
hub / github.com/helm/helm / TestParseErrors

Function TestParseErrors

pkg/engine/engine_test.go:458–472  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

456}
457
458func TestParseErrors(t *testing.T) {
459 vals := common.Values{"Values": map[string]any{}}
460
461 tplsUndefinedFunction := map[string]renderable{
462 "undefined_function": {tpl: `{{foo}}`, vals: vals},
463 }
464 _, err := new(Engine).render(tplsUndefinedFunction)
465 if err == nil {
466 t.Fatalf("Expected failures while rendering: %s", err)
467 }
468 expected := `parse error at (undefined_function:1): function "foo" not defined`
469 if err.Error() != expected {
470 t.Errorf("Expected '%s', got %q", expected, err.Error())
471 }
472}
473
474func TestExecErrors(t *testing.T) {
475 vals := common.Values{"Values": map[string]any{}}

Callers

nothing calls this directly

Calls 3

renderMethod · 0.80
FatalfMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…