testutil

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeRESTMapper added in v0.14.0

func NewFakeRESTMapper(gvks ...schema.GroupVersionKind) meta.RESTMapper

Types

type TestFilesystem

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

TestFilesystem creates directories and files for testing

func Setup

func Setup(t *testing.T, dirs ...string) TestFilesystem

Setupd creates directories in the test filesystem, returning the TestFilesystem.

func (TestFilesystem) Clean

func (tf TestFilesystem) Clean()

Clean deletes the test filesystem.

func (TestFilesystem) GetRootDir

func (tf TestFilesystem) GetRootDir() string

GetRootDir returns the path to the root of the test filesystem.

func (TestFilesystem) WriteFile

func (tf TestFilesystem) WriteFile(t *testing.T, path string, value []byte)

WriteFile writes a file in the test filesystem at relative "path" containing the bytes "value".

Jump to

Keyboard shortcuts

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