Documentation ¶
Index ¶
- func AddToInformer(t *testing.T, store cache.Store) func(ktesting.Action) (bool, runtime.Object, error)
- func PrependResourceVersionReactor(f *ktesting.Fake)
- func SeedTestData(t *testing.T, ctx context.Context, d Data) (Clients, Informers)
- type Assets
- type Clients
- type Data
- type Informers
- type ResourceVersionReactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToInformer ¶
func AddToInformer(t *testing.T, store cache.Store) func(ktesting.Action) (bool, runtime.Object, error)
AddToInformer returns a function to add ktesting.Actions to the cache store
func PrependResourceVersionReactor ¶
PrependResourceVersionReactor will instrument a client-go testing Fake with a reactor that simulates resourceVersion changes on mutations. This does not work with patches.
Types ¶
type Assets ¶
type Assets struct { Logger *zap.SugaredLogger Controller *controller.Impl Clients Clients Informers Informers Recorder *record.FakeRecorder Ctx context.Context }
Assets holds references to the controller, logs, clients, and informers.
type Clients ¶
type Clients struct { ResolutionRequests *fakeresolutionclientset.Clientset Kube *fakekubeclientset.Clientset }
Clients holds references to clients which are useful for reconciler tests.
type Data ¶
type Data struct { ResolutionRequests []*v1alpha1.ResolutionRequest Namespaces []*corev1.Namespace ConfigMaps []*corev1.ConfigMap ServiceAccounts []*corev1.ServiceAccount LimitRange []*corev1.LimitRange }
Data represents the desired state of the system (i.e. existing resources) to seed controllers with.
type Informers ¶
type Informers struct { ConfigMap coreinformers.ConfigMapInformer ServiceAccount coreinformers.ServiceAccountInformer LimitRange coreinformers.LimitRangeInformer ResolutionRequest resolutioninformersv1alpha1.ResolutionRequestInformer }
Informers holds references to informers which are useful for reconciler tests.
type ResourceVersionReactor ¶
type ResourceVersionReactor struct {
// contains filtered or unexported fields
}
ResourceVersionReactor is an implementation of Reactor for our tests
Click to show internal directories.
Click to hide internal directories.