kubernetes/vendor/k8s.io/klog/v2/test/output.go

// InitKlog must be called in a test to configure klog for testing.
// The previous klog configuration will be restored automatically
// after the test.
//
// The returned flag set has the klog flags registered. It can
// be used to make further changes to the klog configuration.
func InitKlog(tb testing.TB) *flag.FlagSet {}

type OutputConfig

type testcase

var tests

func printWithLogger(logger logr.Logger, test testcase) {}

var (
	_
	_
	printWithLoggerLine
	_
)

func initPrintWithKlog(tb testing.TB, test testcase) {}

func printWithKlog(test testcase) {}

var (
	_
	_
	printWithKlogLine
	_
)

// Output covers various special cases of emitting log output.
// It can be used for arbitrary logr.Logger implementations.
//
// The expected output is what klog would print. When testing loggers
// that emit different output, a mapping from klog output to the
// corresponding logger output must be provided, otherwise the
// test will compare against the expected klog output.
//
// Loggers will be tested with direct calls to Info or
// as backend for klog.
func Output(t *testing.T, config OutputConfig) {}

// Benchmark covers various special cases of emitting log output.
// It can be used for arbitrary logr.Logger implementations.
//
// Loggers will be tested with direct calls to Info or
// as backend for klog.
func Benchmark(b *testing.B, config OutputConfig) {}

func setLogger(logger logr.Logger) bool {}

func copySlice(in []interface{}

type kmeta

func (k kmeta) GetName() string {}

func (k kmeta) GetNamespace() string {}

var _

type customErrorJSON

var _

var _

func (e *customErrorJSON) Error() string {}

func (e *customErrorJSON) MarshalJSON() ([]byte, error) {}

type stringer

// String crashes when called for nil.
func (s *stringer) String() string {}

var _

type faultyStringer

// String always panics.
func (f faultyStringer) String() string {}

var _

type faultyMarshaler

// MarshalLog always panics.
func (f faultyMarshaler) MarshalLog() interface{}

var _

type recursiveMarshaler

// MarshalLog returns itself, which could cause the logger to recurse infinitely.
func (r recursiveMarshaler) MarshalLog() interface{}

var _

type faultyError

// Error always panics.
func (f faultyError) Error() string {}

var _

type typeMeta

func (t typeMeta) String() string {}

func (t typeMeta) MarshalLog() interface{}

type myConfig

var _

var _

type myList

func newCyclicList() *myList {}