Documentation
¶
Overview ¶
Package helmtest provides test helpers for consumers of pkg/helm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockingRenderer ¶
type BlockingRenderer struct{}
BlockingRenderer blocks until the context is canceled, then returns the context error. Useful for verifying context cancellation propagation.
func (*BlockingRenderer) Render ¶
func (b *BlockingRenderer) Render(ctx context.Context, _ helm.ChartInput) ([]byte, error)
Render blocks until ctx is done.
type MockRenderer ¶
type MockRenderer struct {
// Rendered maps component name → rendered YAML bytes.
Rendered map[string][]byte
// Errs maps component name → error to return.
Errs map[string]error
// Inputs records every ChartInput passed to Render, in call order.
Inputs []helm.ChartInput
// contains filtered or unexported fields
}
MockRenderer is a test double for helm.Renderer that returns canned YAML keyed by ChartInput.Name. It satisfies helm.Renderer so any package that needs to test chart rendering can inject it instead of requiring the helm binary on PATH.
func (*MockRenderer) Render ¶
func (m *MockRenderer) Render(_ context.Context, input helm.ChartInput) ([]byte, error)
Render returns the canned response for the given input name.
Click to show internal directories.
Click to hide internal directories.