testhelper

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TestData   = env.TestData
	FileSystem = env.FileSystem
)

Functions

This section is empty.

Types

type CLI

type CLI struct {
	clictx.Context
}

func NewCLI

func NewCLI(ctx clictx.Context) *CLI

func (*CLI) Execute

func (c *CLI) Execute(args ...string) error

func (*CLI) ExecuteModified

func (c *CLI) ExecuteModified(mod func(ctx clictx.Context, cmd *cobra.Command), args ...string) error

type TestEnv

type TestEnv struct {
	*builder.Builder
	CLI
}

func NewTestEnv

func NewTestEnv(opts ...env.Option) *TestEnv

func (*TestEnv) ApplyOption

func (e *TestEnv) ApplyOption(opts accessio.Options) error

func (TestEnv) CatchErrorOutput

func (e TestEnv) CatchErrorOutput(w io.Writer) *TestEnv

func (TestEnv) CatchOutput

func (e TestEnv) CatchOutput(w io.Writer) *TestEnv

func (*TestEnv) ConfigContext

func (e *TestEnv) ConfigContext() config.Context

func (*TestEnv) CredentialsContext

func (e *TestEnv) CredentialsContext() credentials.Context

func (*TestEnv) FileSystem

func (e *TestEnv) FileSystem() vfs.FileSystem

func (*TestEnv) OCIContext

func (e *TestEnv) OCIContext() oci.Context

func (*TestEnv) OCMContext

func (e *TestEnv) OCMContext() ocm.Context

func (*TestEnv) ReadTextFile

func (e *TestEnv) ReadTextFile(path string) (string, error)

func (TestEnv) WithInput

func (e TestEnv) WithInput(r io.Reader) *TestEnv

Jump to

Keyboard shortcuts

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