- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 33 for AddReactor (0.13 sec)
-
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) -
pkg/kubelet/kubelet_volumes_test.go
} testKubelet := newTestKubelet(t, true /* controllerAttachDetachEnabled */) defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 17 16:53:28 UTC 2023 - 20.4K 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) -
pkg/controller/podautoscaler/horizontal_test.go
&emfake.FakeExternalMetricsClient{}, ) testScaleClient.AddReactor("get", "deployments", func(action core.Action) (handled bool, ret runtime.Object, err error) { deploymentName := action.(core.GetAction).GetName() obj := scaleList[deploymentName] return true, obj, nil }) testClient.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 14:24:16 UTC 2024 - 199.3K bytes - Viewed (0) -
pkg/kubelet/volumemanager/reconciler/reconciler_test.go
DevicePath: "fake/path", }) } fakeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ ObjectMeta: metav1.ObjectMeta{Name: string(nodeName)}, Status: v1.NodeStatus{ VolumesAttached: attachedVolumes, }, }, nil }, ) fakeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 09 07:34:33 UTC 2024 - 75.4K bytes - Viewed (0) -
pkg/kubelet/kubelet_node_status_test.go
kubeClient.AddReactor("create", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, nil, tc.createError }) kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { // Return an existing (matching) node on get. return true, tc.existingNode, tc.getError })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 19:23:19 UTC 2024 - 115.8K 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) -
pkg/kubelet/volumemanager/populator/desired_state_of_world_populator_test.go
Other string = "other" ) func pluginPVOmittingClient(dswp *desiredStateOfWorldPopulator) { fakeClient := &fake.Clientset{} fakeClient.AddReactor("get", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) { return false, nil, nil }) fakeClient.AddReactor("get", "persistentvolumes", func(action core.Action) (bool, runtime.Object, error) { return false, nil, nil }) dswp.kubeClient = fakeClient }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 51.4K bytes - Viewed (0) -
pkg/controller/podautoscaler/replica_calculator_test.go
podNamePrefix = "test-pod" numContainersPerPod = 2 ) func (tc *replicaCalcTestCase) prepareTestClientSet() *fake.Clientset { fakeClient := &fake.Clientset{} fakeClient.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { obj := &v1.PodList{} podsCount := int(tc.currentReplicas) // Failed pods are not included in tc.currentReplicas
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Aug 19 03:31:34 UTC 2023 - 68.4K bytes - Viewed (0)