ensure

package
v3.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelmHome

func HelmHome(t *testing.T) func()

HelmHome sets up a Helm Home in a temp dir.

func TempDir

func TempDir(t *testing.T) string

TempDir ensures a scratch test directory for unit testing purposes.

func TempFile

func TempFile(t *testing.T, name string, data []byte) string

TempFile ensures a temp file for unit testing purposes.

It returns the path to the directory (to which you will still need to join the filename)

You must clean up the directory that is returned.

tempdir := TempFile(t, "foo", []byte("bar"))
defer os.RemoveAll(tempdir)
filename := filepath.Join(tempdir, "foo")

Types

This section is empty.

Jump to

Keyboard shortcuts

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