test

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStringContains

func CheckStringContains(t *testing.T, got, expected string)

func CheckStringOmits

func CheckStringOmits(t *testing.T, got, expected string)

func EmptyRun

func EmptyRun(*cobra.Command, []string) error

func ExecuteCommand

func ExecuteCommand(root *cobra.Command, args ...string) (output string, err error)

func ExecuteCommandWithContext

func ExecuteCommandWithContext(ctx ctx.Context, root *cobra.Command, args ...string) (output string, err error)

func NewNoopLogger

func NewNoopLogger() log.Logger

used for testing

func ResetCommandLineFlagSet

func ResetCommandLineFlagSet()

func SetUpConfigBeforeTestWithConfigPath

func SetUpConfigBeforeTestWithConfigPath(configPath, fileName string) error

Types

type NoopLogger

type NoopLogger struct{}

logger used for testing, does nothing

func (NoopLogger) DPanic

func (n NoopLogger) DPanic(args ...interface{})

func (NoopLogger) DPanicf

func (n NoopLogger) DPanicf(template string, args ...interface{})

func (NoopLogger) DPanicw

func (n NoopLogger) DPanicw(msg string, keysAndValues ...interface{})

func (NoopLogger) Debug

func (n NoopLogger) Debug(args ...interface{})

func (NoopLogger) Debugf

func (n NoopLogger) Debugf(template string, args ...interface{})

func (NoopLogger) Debugw

func (n NoopLogger) Debugw(msg string, keysAndValues ...interface{})

func (NoopLogger) Error

func (n NoopLogger) Error(args ...interface{})

func (NoopLogger) Errorf

func (n NoopLogger) Errorf(template string, args ...interface{})

func (NoopLogger) Errorw

func (n NoopLogger) Errorw(msg string, keysAndValues ...interface{})

func (NoopLogger) Fatal

func (n NoopLogger) Fatal(args ...interface{})

func (NoopLogger) Fatalf

func (n NoopLogger) Fatalf(template string, args ...interface{})

func (NoopLogger) Fatalw

func (n NoopLogger) Fatalw(msg string, keysAndValues ...interface{})

func (NoopLogger) Info

func (n NoopLogger) Info(args ...interface{})

func (NoopLogger) Infof

func (n NoopLogger) Infof(template string, args ...interface{})

func (NoopLogger) Infow

func (n NoopLogger) Infow(msg string, keysAndValues ...interface{})

func (NoopLogger) Panic

func (n NoopLogger) Panic(args ...interface{})

func (NoopLogger) Panicf

func (n NoopLogger) Panicf(template string, args ...interface{})

func (NoopLogger) Panicw

func (n NoopLogger) Panicw(msg string, keysAndValues ...interface{})

func (NoopLogger) Warn

func (n NoopLogger) Warn(args ...interface{})

func (NoopLogger) Warnf

func (n NoopLogger) Warnf(template string, args ...interface{})

func (NoopLogger) Warnw

func (n NoopLogger) Warnw(msg string, keysAndValues ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳