package
0.0.0-20250228085210-08c043ffe118
Repository: https://github.com/maistra/istio-operator.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
Assert creates a new ActionAssertionFactory for the given verb.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ConvertToTypedIfKnown returns a typed object for the GVK of the unstructured object, if the type is known to the Scheme.
No description provided by the author
No description provided by the author
FilterWithLabels returns a copy of the items in objs matching labelSel.
No description provided by the author
No description provided by the author
No description provided by the author
NewCache returns a new FakeCache backed by the specified tracker.
NewCreateSimulator returns a ReactionFunc that simulates the work done by the api server to initialize a newly created object.
NewDeleteSimulator returns a ReactionFunc that simulates delete processing in the api server.
NewEnhancedTracker returns a new EnhancedTracker, backed by the delegate.
NewFakeClient creates a new fake client for testing.
NewFakeClientWithScheme creates a new fake client with the given scheme for testing.
NewFakeClientWithSchemeAndTracker creates a new fake client with the given scheme and tracker for testing.
NewManager returns a new FakeManager that can be used for testing.
NewManagerForControllerTest creates a new FakeManager that can be used for running controller tests.
NewManagerOptions returns a set of options that create a "normal" manager for use with unit tests.
NewRecorderProvider returns a new FakeRecorderProvider.
NewSimpleActionVerifier returns a new ActionVerifier that filtering the specified verb, resource, etc., using the specified verifier function.
NewUpdateSimulator creates a ReactionFunc that simulates the update processing in the api server, e.g.
No description provided by the author
No description provided by the author
ReactTo creates a new factory applied to the specified verb.
RunControllerTestCase executes each test case using a new manager.Manager.
StartManager starts the manager and returns a function that can be used to stop the manager.
Verify creates a new ActionVerifierFactory for the given verb.
VerifyActions is a list of ActionVerifier objects which are applied in order.
WrapReconciler wraps the reconciler with a channel that is notified of the request/response of the reconcile.Reconciler.
# Variables
No description provided by the author
# Structs
AbstractActionFilter serves as a base for building ActionAssertion and ActionVerifier types that filter actions based on verb, resource, subresource, namespace, and name.
ActionAssertionFactory serves as a factory for building ActionAssertion types that filter actions based on verb, resource, subresource, namespace, and name.
ActionIsSeenAssertion asserts that an action matching its ActionAssertionFilter has been seen.
ActionNotSeenAssertion asserts that an action matching its ActionAssertionFilter has not been seen.
ActionSeenCountAssertion asserts that a required number of actions matching its ActionAssertionFilter have been seen.
ActionVerifierFactory is a factory for creating common verifiers.
ControllerTestCase represents a test case for a controller.
ControllerTestEvent represents an event that is sent through the controller manager, including all necessary reactions and verification logic.
EnhancedTracker is a testing.ObjectTracker that is implemented by a testing.Fake, which delegates to an embedded testing.ObjectTracker for unhandled actions (i.e.
FakeCache is a mock implementation of a cache.Cache which is backed by a testing.ObjectTracker.
FakeManager is a manager that can be used for testing.
FakeRecorderProvider provides a mock recorder.Provider that can be used with controller tests.
Reactor implments clienttesting.Reactor, but allows access to the underlying clienttesting.ObjectTracker used by the test runner.
ReactorFactory provides a DSL for specifying clienttesting.Reactor objects used with a ControllerTestCase.
ReconcilerInvocation encapsulates the request and response that were sent through a reconcile.Reconciler.
SimpleActionVerifier is a simple ActionVerifier that applies the validation
logic when verb/resource/subresource/name/namespace match an action.
# Interfaces
ActionAssertion asserts something about the actions that have occurred.
ActionVerifier is a specialized Reactor that is used to verify an action (event) generated by the controller, e.g.
TrackerInjector should be implemented by types that wish to have a testing.ObjectTracker injected into them.
# Type aliases
ActionAssertions is simply a typedef for an ActionAssertion slice.
ActionVerifierFunc is a function that performs verification logic against some action.
AddControllerFunc represents a function that adds a controller to the controller manager simulator.
GenerateEventFunc is a function which triggers some test action.
ReactionFunc is a specialized version of clienttesting.ReactionFunc, which includes an ObjectTracker that can be used in the reaction.
VerifierTestFunc is used for testing an action, returning an error if the test failed.