Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for makeClient (0.26 sec)

  1. pkg/controller/statefulset/stateful_set_status_updater_test.go

    )
    
    func TestStatefulSetUpdaterUpdatesSetStatus(t *testing.T) {
    	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)
  2. pkg/controller/ttl/ttl_controller_test.go

    		},
    	}
    
    	for i, testCase := range testCases {
    		fakeClient := &fake.Clientset{}
    		ttlController := &Controller{
    			kubeClient: fakeClient,
    		}
    		err := ttlController.patchNodeWithAnnotation(context.TODO(), testCase.node, v1.ObjectTTLAnnotationKey, testCase.ttlSeconds)
    		if err != nil {
    			t.Errorf("%d: unexpected error: %v", i, err)
    			continue
    		}
    		actions := fakeClient.Actions()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  3. pkg/controller/clusterroleaggregation/clusterroleaggregation_controller_test.go

    				for _, obj := range test.startingClusterRoles {
    					objs = append(objs, obj)
    					indexer.Add(obj)
    				}
    				fakeClient := fakeclient.NewSimpleClientset(objs...)
    
    				// The default reactor doesn't support apply, so we need our own (trivial) reactor
    				fakeClient.PrependReactor("patch", "clusterroles", func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 9K bytes
    - Viewed (0)
  4. pkg/volume/csi/testing/testing.go

    	"k8s.io/client-go/informers"
    	fakeclient "k8s.io/client-go/kubernetes/fake"
    	utiltesting "k8s.io/client-go/util/testing"
    	"k8s.io/kubernetes/pkg/volume"
    	"k8s.io/kubernetes/pkg/volume/csi"
    	volumetest "k8s.io/kubernetes/pkg/volume/testing"
    )
    
    // NewTestPlugin creates a plugin mgr to load plugins and setup a fake client
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 07 00:11:50 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  5. pkg/controller/nodeipam/ipam/test/utils.go

    }
    
    // FakeNodeInformer creates a fakeNodeInformer using the provided fakeNodeHandler.
    func FakeNodeInformer(fakeNodeHandler *testutil.FakeNodeHandler) coreinformers.NodeInformer {
    	fakeClient := &fake.Clientset{}
    	fakeInformerFactory := informers.NewSharedInformerFactory(fakeClient, controller.NoResyncPeriodFunc())
    	fakeNodeInformer := fakeInformerFactory.Core().V1().Nodes()
    
    	for _, node := range fakeNodeHandler.Existing {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 06 00:10:39 UTC 2022
    - 2K bytes
    - Viewed (0)
  6. pkg/kubelet/secret/secret_manager_test.go

    	}
    }
    
    func noObjectTTL() (time.Duration, bool) {
    	return time.Duration(0), false
    }
    
    func getSecret(fakeClient clientset.Interface) manager.GetObjectFunc {
    	return func(namespace, name string, opts metav1.GetOptions) (runtime.Object, error) {
    		return fakeClient.CoreV1().Secrets(namespace).Get(context.TODO(), name, opts)
    	}
    }
    
    type envSecrets struct {
    	envVarNames  []string
    	envFromNames []string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 10 10:20:09 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  7. pkg/kubelet/configmap/configmap_manager_test.go

    	}
    }
    
    func noObjectTTL() (time.Duration, bool) {
    	return time.Duration(0), false
    }
    
    func getConfigMap(fakeClient clientset.Interface) manager.GetObjectFunc {
    	return func(namespace, name string, opts metav1.GetOptions) (runtime.Object, error) {
    		return fakeClient.CoreV1().ConfigMaps(namespace).Get(context.TODO(), name, opts)
    	}
    }
    
    type envConfigMaps struct {
    	envVarNames  []string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 10 10:20:09 UTC 2021
    - 4.8K bytes
    - Viewed (0)
  8. pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator_test.go

    )
    
    func TestFindAndAddActivePods_FindAndRemoveDeletedPods(t *testing.T) {
    	fakeVolumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t)
    	fakeClient := &fake.Clientset{}
    
    	fakeInformerFactory := informers.NewSharedInformerFactory(fakeClient, controller.NoResyncPeriodFunc())
    	fakePodInformer := fakeInformerFactory.Core().V1().Pods()
    
    	fakesDSW := cache.NewDesiredStateOfWorld(fakeVolumePluginMgr)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 10:42:15 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  9. pkg/controlplane/reconcilers/helpers_test.go

    		slice.Ports[i].Port = &ports[i].Port
    	}
    	return slice
    }
    
    func verifyCreatesAndUpdates(fakeClient *fake.Clientset, expectedCreates, expectedUpdates []runtime.Object) error {
    	errors := []error{}
    
    	updates := []k8stesting.UpdateAction{}
    	creates := []k8stesting.CreateAction{}
    	for _, action := range fakeClient.Actions() {
    		if action.GetVerb() == "update" {
    			updates = append(updates, action.(k8stesting.UpdateAction))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 27 12:46:23 UTC 2022
    - 4K bytes
    - Viewed (0)
  10. pkg/controller/volume/attachdetach/metrics/metrics_test.go

    	"k8s.io/kubernetes/pkg/volume/util/types"
    )
    
    func TestVolumesInUseMetricCollection(t *testing.T) {
    	fakeVolumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t)
    	fakeClient := &fake.Clientset{}
    
    	fakeInformerFactory := informers.NewSharedInformerFactory(fakeClient, controller.NoResyncPeriodFunc())
    	fakePodInformer := fakeInformerFactory.Core().V1().Pods()
    	pod := &v1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "metric-test-pod",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 10:42:15 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top