Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for AddReactor (0.24 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top