package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

Consistently wraps [gomega.Consistently] the same way as [Eventually] wraps [gomega.Eventually].
Eventually wraps [gomega.Eventually] such that a failure will be reported via TContext.Fatal.
Init can be called in a unit or integration test to create a test context which: - has a per-test logger with verbosity derived from the -v command line flag - gets canceled when the test finishes (via [TB.Cleanup]) Note that the test context supports the interfaces of [TB] and [context.Context] and thus can be used like one of those where needed.
InitCtx is a variant of [Init] which uses an already existing context and whatever logger and timeouts are stored there.
NewTestContext is a replacement for ktesting.NewTestContext which returns a more versatile context.
SetDefaultVerbosity can be called during init to modify the default log verbosity of the program.
Step is useful when the context with the step information is used more than once: ktesting.Step(tCtx, "step 1", func(tCtx ktesting.TContext) { tCtx.Log(...) if (..
WithCancel sets up cancellation in a [TContext.Cleanup] callback and constructs a new TContext where [TContext.Cancel] cancels only the new context.
WithClients uses an existing config and clients.
WithContext constructs a new TContext with a different Context instance.
WithError creates a context where test failures are collected and stored in the provided error instance when the caller is done.
WithLogger constructs a new context with a different logger.
WithRESTConfig initializes all client-go clients with new clients created for the config.
WithStep creates a context where a prefix is added to all errors and log messages, similar to how errors are wrapped.
WithTB constructs a new TContext with a different TB instance.
WithTimeout sets up new context with a timeout.
WithValue wraps context.WithValue such that the result is again a TContext.

# Constants

CleanupGracePeriod is the time that a [TContext] gets canceled before the deadline of its underlying test suite (usually determined via "go test -timeout").

# Variables

ErrFailure is an empty error that can be wrapped to indicate that an error is a FailureError.

# Structs

FailureError is an error where the error string is meant to be passed to [TContext.Fatal] directly, i.e.

# Interfaces

ContextTB adds support for cleanup callbacks with explicit context parameter.
TB is the interface common to [testing.T], [testing.B], [testing.F] and [github.com/onsi/ginkgo/v2].
TContext combines [context.Context], [TB] and some additional methods.

# Type aliases

No description provided by the author
Underlier is the additional interface implemented by the per-test LogSink behind [TContext.Logger].