testutils

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFile

func GetFile(path string) []byte

func NewSecret

func NewSecret(name, namespace string, keys bool, data map[string][]byte) *corev1.Secret

func UntarFile

func UntarFile(path, name string) error

Types

type MockFilesystem

type MockFilesystem struct {
	ExpectedConfigmap string
	ExpectedSecret    string
	// contains filtered or unexported fields
}

func NewMockFilesystem

func NewMockFilesystem(temporaryDirectory, caseFile string) *MockFilesystem

func (*MockFilesystem) ReadDir

func (fs *MockFilesystem) ReadDir(dirpath string) ([]fs.DirEntry, error)

func (*MockFilesystem) ReadFile

func (fs *MockFilesystem) ReadFile(filepath string) ([]byte, error)

type NotFoundError

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Is

func (e *NotFoundError) Is(target error) bool

type TestFile

type TestFile struct {
	Path string `json:"path"`
	Data string `json:"data"`
}

Jump to

Keyboard shortcuts

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