testutils

package
v0.0.0-...-2caf503 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureOutput

func CaptureOutput(f func()) (printed string)

CaptureOutput runs a function and captures returns STDOUT output as a string.

func CaptureOutputSync

func CaptureOutputSync(f func()) (printed string)

CaptureOutputSync runs a function synchronously and captures returns STDOUT output as a string.

func Int64Value

func Int64Value(x int64) *int64

Int64Value returns a pointer of a value

func TempClusterCache

func TempClusterCache(fs afero.Fs, cacheYAML string) (string, error)

TempClusterCache creates a temporary config directory with clustercache file containing the given cache content The directory path is returned.

func TempConfig

func TempConfig(fs afero.Fs, configYAML string) (string, error)

TempConfig creates a temporary config directory with config.yaml file containing the given YAML content and initializes our config from it. The directory path is returned.

func TempDir

func TempDir(fs afero.Fs) string

TempDir creates a temporary directory for a temporary config file in tests.

func TempKubeconfig

func TempKubeconfig(fs afero.Fs) (string, error)

TempKubeconfig creates a temporary kubectl config file for testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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