tests

package
v0.0.0-...-17967aa Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderChart

func RenderChart(chart, values, dir string) error

RenderChart renders a Helm chart to a given directory.

func StripNonDeterministic

func StripNonDeterministic(path string) error

StripNonDeterministic removes properties from all of the manifests in a given directory.

Types

type HelmError

type HelmError struct {
	RawOutput    []byte
	CommandError error
}

HelmError represents an error returned by the Helm CLI.

func (*HelmError) Error

func (h *HelmError) Error() string

Error satisfies the error interface.

type Snapshot

type Snapshot struct {
	// contains filtered or unexported fields
}

Snapshot represents a rendered Helm chart.

func CaptureSnapshot

func CaptureSnapshot(chart, values string) (*Snapshot, error)

CaptureSnapshot renders a new snapshot from a given Helm chart and values file.

func LoadSnapshot

func LoadSnapshot(dir string) (*Snapshot, error)

LoadSnapshot loads a snapshot from disk. Expects the directory to be a chart rendered with `helm template --output-dir`.

func (*Snapshot) Diff

func (s *Snapshot) Diff(t *testing.T, expected *Snapshot)

Diff takes an expected snapshot, and compares it to itself.

Jump to

Keyboard shortcuts

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