- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for AddReactor (0.46 sec)
-
pkg/controller/statefulset/stateful_set_status_updater_test.go
set := newStatefulSet(3) status := apps.StatefulSetStatus{ObservedGeneration: 1, Replicas: 2} fakeClient := &fake.Clientset{} updater := NewRealStatefulSetStatusUpdater(fakeClient, nil) fakeClient.AddReactor("update", "statefulsets", func(action core.Action) (bool, runtime.Object, error) { update := action.(core.UpdateAction) return true, update.GetObject(), nil })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 13 15:37:10 UTC 2022 - 5.9K bytes - Viewed (0) -
plugin/pkg/admission/namespace/exists/admission_test.go
// newMockClientForTest creates a mock client that returns a client configured for the specified list of namespaces. func newMockClientForTest(namespaces []string) *fake.Clientset { mockClient := &fake.Clientset{} mockClient.AddReactor("list", "namespaces", func(action core.Action) (bool, runtime.Object, error) { namespaceList := &corev1.NamespaceList{ ListMeta: metav1.ListMeta{ ResourceVersion: fmt.Sprintf("%d", len(namespaces)), }, }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 4.4K bytes - Viewed (0) -
plugin/pkg/admission/namespace/autoprovision/admission_test.go
// newMockClientForTest creates a mock client that returns a client configured for the specified list of namespaces. func newMockClientForTest(namespaces []string) *fake.Clientset { mockClient := &fake.Clientset{} mockClient.AddReactor("list", "namespaces", func(action core.Action) (bool, runtime.Object, error) { namespaceList := &corev1.NamespaceList{ ListMeta: metav1.ListMeta{ ResourceVersion: fmt.Sprintf("%d", len(namespaces)), }, }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 7.5K bytes - Viewed (0) -
pkg/controller/volume/expand/expand_controller_test.go
return volumetypes.NewOperationContext(nil, nil, false) }) if test.pv != nil { fakeKubeClient.AddReactor("get", "persistentvolumes", func(action coretesting.Action) (bool, runtime.Object, error) { return true, test.pv, nil }) } fakeKubeClient.AddReactor("patch", "persistentvolumeclaims", func(action coretesting.Action) (bool, runtime.Object, error) { if action.GetSubresource() == "status" {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 18 11:00:37 UTC 2024 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go
for _, obj := range objects { if err := o.Add(obj); err != nil { panic(err) } } cs := &Clientset{tracker: o} cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 08 21:36:26 UTC 2023 - 3.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/resourcequota/resource_access_test.go
accessor, _ := newQuotaAccessor() accessor.client = kubeClient accessor.lister = informerFactory.Core().V1().ResourceQuotas().Lister() kubeClient.AddReactor("list", "resourcequotas", func(action core.Action) (bool, runtime.Object, error) { switch action.GetNamespace() { case testNamespace1: atomic.AddInt64(&listCallCountTestNamespace1, 1) case testNamespace2:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 10 13:54:56 UTC 2024 - 7.2K bytes - Viewed (0) -
pkg/controller/certificates/approver/sarapprove_test.go
} }, }, } for _, c := range cases { t.Run(fmt.Sprintf("recognized:%v,allowed: %v,err: %v", c.recognized, c.allowed, c.err), func(t *testing.T) { client := &fake.Clientset{} client.AddReactor("create", "subjectaccessreviews", func(action testclient.Action) (handled bool, ret runtime.Object, err error) { return true, &authorization.SubjectAccessReview{ Status: authorization.SubjectAccessReviewStatus{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 02 21:12:04 UTC 2022 - 7.7K bytes - Viewed (0)