helmtest

package
v0.15.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL