package
0.0.0-20200122233423-62801f1d34cf
Repository: https://github.com/vishvananda/pkg.git
Documentation: pkg.go.dev
# Functions
Eventf formats as FakeRecorder does.
ExpectNormalEventDelivery returns a hook function that can be passed to a Hooks.OnCreate() call to verify that an event of type Normal was created matching the given regular expression.
ExpectWarningEventDelivery returns a hook function that can be passed to a Hooks.OnCreate() call to verify that an event of type Warning was created matching the given regular expression.
InduceFailure is used in conjunction with TableTest's WithReactors field.
KeyOrDie returns the string key of the Kubernetes object or panics if a key cannot be generated.
NewHooks returns a Hooks struct that can be used to attach hooks to one or more fake clients and wait for all hooks to complete.
No description provided by the author
PrependGenerateNameReactor will instrument a client-go testing Fake with a reactor that simulates 'generateName' functionality.
SetupFakeContext sets up the the Context and the fake informers for the tests.
SetupFakeContextWithCancel sets up the the Context and the fake informers for the tests The provided context can be canceled using provided callback.
No description provided by the author
No description provided by the author
# Constants
HookComplete indicates the hook function completed, and WaitForHooks should not wait for it.
HookIncomplete indicates the hook function is incomplete, and WaitForHooks should wait for it to complete.
# Structs
Actions stores list of Actions recorded by the reactors.
EventList exports all events during reconciliation through fake event recorder with event channel with buffer of given size.
No description provided by the author
FakeStatsReporter is a fake implementation of StatsReporter.
FakeTracker implements Tracker.
GenerateNameReactor will simulate the k8s API server and generate a name for resources who's metadata.generateName property is set.
Hooks is a utility struct that simplifies controller testing with fake
clients.
No description provided by the author
TableRow holds a single row of our table test.
# Interfaces
ActionRecorder contains list of K8s request actions.
# Type aliases
ActionRecorderList is a list of ActionRecorder objects.
CreateHookFunc is a function for handling a Create hook.
DeleteHookFunc is a function for handling a delete hook.
Factory returns a Reconciler.Interface to perform reconciliation in table test, ActionRecorderList/EventList to capture k8s actions/events produced during reconciliation and FakeStatsReporter to capture stats.
HookResult is the return value of hook functions.
NullTracker implements Tracker
Alias is preserved for backwards compatibility.
TableTest represents a list of TableRow tests instances.
UpdateHookFunc is a function for handling an update hook.