Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSimpleGeneratedName ¶
AddSimpleGeneratedName returns the given object with a simple generated name added to its metadata. If a name already exists, there is no GenerateName field set, or there is an issue accessing the object's metadata the object is returned unmodified.
func AddSimpleGeneratedNames ¶
AddSimpleGeneratedNames returns the list objects with simple generated names added to their metadata. If a name already exists, there is no GenerateName field set, or there is an issue accessing the object's metadata the object is returned unmodified.
func BuildSelfLink ¶
BuildSelfLink returns a selflink for the given group version, plural, namespace, and name.
Types ¶
type ClientsetDecorator ¶
type ClientsetDecorator interface { // PrependReactor adds a reactor to the beginning of the chain. PrependReactor(verb, resource string, reaction testing.ReactionFunc) }
ClientsetDecorator defines decorator methods for a Clientset.
type Option ¶
type Option func(ClientsetDecorator)
Option configures a ClientsetDecorator
func WithNameGeneration ¶
WithNameGeneration returns a fakeK8sClientOption that configures a Clientset to write generated names to all types on create.
func WithSelfLinks ¶
WithSelfLinks returns a fakeClientOption that configures a ClientsetDecorator to write selfLinks to all OLM types on create.
type ReactionForwardingClientsetDecorator ¶
type ReactionForwardingClientsetDecorator struct { fake.Clientset ReactionChain []testing.Reactor // shadow embedded ReactionChain // contains filtered or unexported fields }
ReactionForwardingClientsetDecorator wraps a Clientset and "forwards" Action object mutations from all successful non-handling Reactors along the chain to the first handling Reactor. This is is a stopgap until we can upgrade to client-go v11.0, where the behavior is the default (see https://github.com/kubernetes/client-go/blob/6ee68ca5fd8355d024d02f9db0b3b667e8357a0f/testing/fake.go#L130).
func NewReactionForwardingClientsetDecorator ¶
func NewReactionForwardingClientsetDecorator(objects []runtime.Object, options ...Option) *ReactionForwardingClientsetDecorator
NewReactionForwardingClientsetDecorator returns the ReactionForwardingClientsetDecorator wrapped Clientset result of calling NewSimpleClientset with the given objects.
func (*ReactionForwardingClientsetDecorator) PrependReactor ¶
func (c *ReactionForwardingClientsetDecorator) PrependReactor(verb, resource string, reaction testing.ReactionFunc)
PrependReactor adds a reactor to the beginning of the chain.