testutils

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomName added in v0.7.0

func RandomName(length int) string

RandomName returns a string composed of random lowercase English letters of specified length.

Types

type TestStruct added in v0.5.9

type TestStruct struct {
	Reader          *os.File
	Writer          *os.File
	Err             error
	Ctx             context.Context
	MockClient      *admin.Clientset
	MockAdminClient *mocks.AdminServiceClient
	FetcherExt      *extMocks.AdminFetcherExtInterface
	UpdaterExt      *extMocks.AdminUpdaterExtInterface
	DeleterExt      *extMocks.AdminDeleterExtInterface
	MockOutStream   io.Writer
	CmdCtx          cmdCore.CommandContext
	StdOut          *os.File
	Stderr          *os.File
}

func Setup

func Setup() (s TestStruct)

func SetupWithExt added in v0.5.9

func SetupWithExt() (s TestStruct)

func (*TestStruct) TearDownAndVerify added in v0.7.0

func (s *TestStruct) TearDownAndVerify(t *testing.T, expectedLog string)

TearDownAndVerify TODO: Change this to verify log lines from context

func (*TestStruct) TearDownAndVerifyContains added in v0.7.0

func (s *TestStruct) TearDownAndVerifyContains(t *testing.T, expectedLog string)

Jump to

Keyboard shortcuts

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