Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 35 for AddReactor (0.13 sec)

  1. 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)
  2. 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)
  3. cmd/kubeadm/app/cmd/token_test.go

    	}
    }
    
    func TestRunCreateToken(t *testing.T) {
    	var buf bytes.Buffer
    	fakeClient := &fake.Clientset{}
    	fakeClient.AddReactor("get", "secrets", func(action core.Action) (handled bool, ret runtime.Object, err error) {
    		return true, nil, apierrors.NewNotFound(v1.Resource("secrets"), "foo")
    	})
    
    	testCases := []struct {
    		name          string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  4. pkg/scheduler/util/utils_test.go

    		},
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			actualPatchRequests := 0
    			var actualPatchData string
    			cs := &clientsetfake.Clientset{}
    			cs.AddReactor("patch", "pods", func(action clienttesting.Action) (bool, runtime.Object, error) {
    				actualPatchRequests++
    				patch := action.(clienttesting.PatchAction)
    				actualPatchData = string(patch.GetPatch())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 14.5K bytes
    - Viewed (0)
  5. cmd/kube-proxy/app/server_linux_test.go

    		},
    	}
    	updatedNode := node.DeepCopy()
    	updatedNode.Spec.PodCIDRs = expected
    	updatedNode.Spec.PodCIDR = expected[0]
    
    	// start with the new node
    	client := clientsetfake.NewSimpleClientset()
    	client.AddReactor("list", "nodes", func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
    		obj := &v1.NodeList{}
    		return true, obj, nil
    	})
    	fakeWatch := watch.NewFake()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Apr 28 15:51:23 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  6. plugin/pkg/admission/limitranger/admission_test.go

    func newMockClientForTest(limitRanges []corev1.LimitRange) *fake.Clientset {
    	mockClient := &fake.Clientset{}
    	mockClient.AddReactor("list", "limitranges", func(action core.Action) (bool, runtime.Object, error) {
    		limitRangeList := &corev1.LimitRangeList{
    			ListMeta: metav1.ListMeta{
    				ResourceVersion: fmt.Sprintf("%d", len(limitRanges)),
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  7. pkg/kubelet/util/manager/cache_based_manager_test.go

    	store.AddReference("ns", "name", "pod")
    
    	result := &v1.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "name", ResourceVersion: "10"}}
    	fakeClient.AddReactor("get", "secrets", func(action core.Action) (bool, runtime.Object, error) {
    		return true, result, nil
    	})
    	secret, err := store.Get("ns", "name")
    	if err != nil {
    		t.Errorf("Unexpected error: %v", err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  8. pkg/controller/history/controller_history_test.go

    		existing []struct {
    			parent   metav1.Object
    			revision *apps.ControllerRevision
    		}
    		err bool
    	}
    	testFn := func(test *testcase, t *testing.T) {
    		client := fake.NewSimpleClientset()
    		client.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) {
    			switch action := action.(type) {
    			case core.PatchActionImpl:
    				var found *apps.ControllerRevision
    				for i := range test.existing {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 21 13:31:28 UTC 2023
    - 49.1K bytes
    - Viewed (0)
  9. pkg/controller/disruption/disruption_test.go

    	replicas := int32(10)
    	pods := int32(4)
    	maxUnavailable := int32(5)
    
    	_, ctx := ktesting.NewTestContext(t)
    	dc, ps := newFakeDisruptionController(ctx)
    
    	dc.scaleClient.AddReactor("get", "customresources", func(action core.Action) (handled bool, ret runtime.Object, err error) {
    		obj := &autoscalingapi.Scale{
    			ObjectMeta: metav1.ObjectMeta{
    				Namespace: metav1.NamespaceDefault,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 50K bytes
    - Viewed (0)
  10. pkg/kubelet/status/status_manager_test.go

    	}
    }
    
    func TestSyncPodIgnoresNotFound(t *testing.T) {
    	client := fake.Clientset{}
    	syncer := newTestManager(&client)
    	client.AddReactor("get", "pods", func(action core.Action) (bool, runtime.Object, error) {
    		return true, nil, errors.NewNotFound(api.Resource("pods"), "test-pod")
    	})
    	syncer.SetPodStatus(getTestPod(), getRandomPodStatus())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 16:27:19 UTC 2024
    - 68.1K bytes
    - Viewed (0)
Back to top