MCPcopy
hub / github.com/helm/helm / TestParallelRenderInternals

Function TestParallelRenderInternals

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

Source from the content-addressed store, hash-verified

429}
430
431func TestParallelRenderInternals(t *testing.T) {
432 // Make sure that we can use one Engine to run parallel template renders.
433 e := new(Engine)
434 var wg sync.WaitGroup
435 for i := range 20 {
436 wg.Add(1)
437 go func(i int) {
438 tt := fmt.Sprintf("expect-%d", i)
439 tpls := map[string]renderable{
440 "t": {
441 tpl: `{{.val}}`,
442 vals: map[string]any{"val": tt},
443 },
444 }
445 out, err := e.render(tpls)
446 if err != nil {
447 t.Errorf("Failed to render %s: %s", tt, err)
448 }
449 if out["t"] != tt {
450 t.Errorf("Expected %q, got %q", tt, out["t"])
451 }
452 wg.Done()
453 }(i)
454 }
455 wg.Wait()
456}
457
458func TestParseErrors(t *testing.T) {
459 vals := common.Values{"Values": map[string]any{}}

Callers

nothing calls this directly

Calls 3

renderMethod · 0.80
WaitMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…