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 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 {
Pipeline *fakepipelineclientset.Clientset
Resource *fakeresourceclientset.Clientset
Kube *fakekubeclientset.Clientset
CloudEvents cloudeventclient.CEClient
}
Clients holds references to clients which are useful for reconciler tests.
type Data ¶
type Data struct {
PipelineRuns []*v1beta1.PipelineRun
Pipelines []*v1beta1.Pipeline
TaskRuns []*v1beta1.TaskRun
Tasks []*v1beta1.Task
ClusterTasks []*v1beta1.ClusterTask
CustomRuns []*v1beta1.CustomRun
Pods []*corev1.Pod
Namespaces []*corev1.Namespace
ConfigMaps []*corev1.ConfigMap
ServiceAccounts []*corev1.ServiceAccount
}
Data represents the desired state of the system (i.e. existing resources) to seed controllers with.
type Informers ¶
type Informers struct {
PipelineRun informersv1beta1.PipelineRunInformer
Pipeline informersv1beta1.PipelineInformer
TaskRun informersv1beta1.TaskRunInformer
CustomRun informersv1beta1.CustomRunInformer
Task informersv1beta1.TaskInformer
ClusterTask informersv1beta1.ClusterTaskInformer
Pod coreinformers.PodInformer
ConfigMap coreinformers.ConfigMapInformer
ServiceAccount coreinformers.ServiceAccountInformer
}
Informers holds references to informers which are useful for reconciler tests.
type ResourceVersionReactor ¶
type ResourceVersionReactor struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.