- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for AddReactor (0.16 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) -
pkg/controller/statefulset/stateful_pod_control_test.go
control := NewStatefulPodControl(fakeClient, nil, claimLister, recorder) fakeClient.AddReactor("get", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) { return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), action.GetResource().Resource) }) fakeClient.AddReactor("create", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 05 19:06:41 UTC 2024 - 35.5K bytes - Viewed (0) -
pkg/controller/volume/attachdetach/testing/testvolumespec.go
return true, obj, nil }) fakeClient.AddReactor("create", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { createAction := action.(core.CreateAction) pod := createAction.GetObject().(*v1.Pod) extraPods.Items = append(extraPods.Items, *pod) return true, createAction.GetObject(), nil })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 17 08:48:30 UTC 2023 - 16.5K bytes - Viewed (0) -
pkg/controller/volume/persistentvolume/testing/testing.go
} client.AddReactor("create", "persistentvolumes", func(action core.Action) (handled bool, ret runtime.Object, err error) { return reactor.React(ctx, action) }) client.AddReactor("create", "persistentvolumeclaims", func(action core.Action) (handled bool, ret runtime.Object, err error) { return reactor.React(ctx, action) })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 20.1K bytes - Viewed (0) -
pkg/kubelet/util/manager/watch_based_manager_test.go
listReactor := func(a core.Action) (bool, runtime.Object, error) { result := &v1.SecretList{ ListMeta: metav1.ListMeta{ ResourceVersion: "123", }, } return true, result, nil } fakeClient.AddReactor("list", "secrets", listReactor) fakeWatch := watch.NewFake() fakeClient.AddWatchReactor("secrets", core.DefaultWatchReactor(fakeWatch, nil)) fakeClock := testingclock.NewFakeClock(time.Now())
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 09 10:05:43 UTC 2023 - 17.2K 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) -
pilot/pkg/leaderelection/k8sleaderelection/leaderelection_test.go
Key: test.key, EventRecorder: &record.FakeRecorder{}, } c := &fake.Clientset{} for _, reactor := range test.reactors { c.AddReactor(reactor.verb, objectType, reactor.reaction) } c.AddReactor("*", "*", func(action fakeclient.Action) (bool, runtime.Object, error) { t.Errorf("unreachable action. testclient called too many times: %+v", action)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jan 23 16:39:43 UTC 2023 - 42.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go
func newMockClientForTest(namespaces map[string]v1.NamespacePhase) *fake.Clientset { mockClient := &fake.Clientset{} mockClient.AddReactor("list", "namespaces", func(action core.Action) (bool, runtime.Object, error) { namespaceList := &v1.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 - 14.2K bytes - Viewed (0) -
pkg/volume/util/operationexecutor/operation_generator_test.go
fakeKubeClient := fakeclient.NewSimpleClientset(pvc, pv) fakeKubeClient.AddReactor("get", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) { return true, pvc, nil }) fakeKubeClient.AddReactor("get", "persistentvolumes", func(action core.Action) (bool, runtime.Object, error) { return true, pv, nil })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 16.2K 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)