Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 54 for makeClient (0.13 sec)

  1. 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)
  2. 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)
  3. pkg/kubelet/certificate/bootstrap/bootstrap_test.go

    const (
    	noError failureType = iota //nolint:deadcode,varcheck
    	createError
    	certificateSigningRequestDenied
    )
    
    type fakeClient struct {
    	certificatesclient.CertificateSigningRequestInterface
    	failureType failureType
    }
    
    func newClientset(opts fakeClient) *fake.Clientset {
    	f := fake.NewSimpleClientset()
    	switch opts.failureType {
    	case createError:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 09 14:24:11 UTC 2023
    - 13K bytes
    - Viewed (0)
  4. istioctl/pkg/tag/generate_test.go

    	defaultWh := defaultRevisionCanonicalWebhook.DeepCopy()
    	fakeClient := kube.NewFakeClient(defaultWh)
    
    	opts := &GenerateOptions{
    		Generate: generate,
    		Tag:      "default",
    		Revision: "default",
    	}
    
    	_, err := Generate(context.TODO(), fakeClient, opts, "istio-system")
    	assert.NoError(t, err)
    
    	wh, err := fakeClient.Kube().AdmissionregistrationV1().MutatingWebhookConfigurations().
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 16 17:43:49 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  5. pkg/volume/csi/csi_block_test.go

    	}
    }
    
    func TestBlockMapperMapPodDeviceNotSupportAttach(t *testing.T) {
    	fakeClient := fakeclient.NewSimpleClientset()
    	attachRequired := false
    	fakeDriver := &storagev1.CSIDriver{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: testDriver,
    		},
    		Spec: storagev1.CSIDriverSpec{
    			AttachRequired: &attachRequired,
    		},
    	}
    	_, err := fakeClient.StorageV1().CSIDrivers().Create(context.TODO(), fakeDriver, metav1.CreateOptions{})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 11 06:07:40 UTC 2023
    - 26.5K bytes
    - Viewed (0)
  6. pkg/volume/csi/csi_plugin_test.go

    		for _, test := range tests {
    			t.Run(test.name, func(t *testing.T) {
    				driver := getTestCSIDriver(testDriver, nil, nil, supported)
    				fakeClient := fakeclient.NewSimpleClientset(driver)
    				plug, tmpDir := newTestPlugin(t, fakeClient)
    				defer os.RemoveAll(tmpDir)
    
    				registerFakePlugin(testDriver, "endpoint", []string{"1.2.0"}, t)
    
    				mounter, err := plug.NewMounter(
    					test.spec,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  7. pkg/registry/core/service/ipallocator/controller/repairip_test.go

    	serviceStore     cache.Store
    	ipAddressStore   cache.Store
    	serviceCIDRStore cache.Store
    }
    
    func newFakeRepair() (*fake.Clientset, *fakeRepair) {
    	fakeClient := fake.NewSimpleClientset()
    
    	informerFactory := informers.NewSharedInformerFactory(fakeClient, 0*time.Second)
    	serviceInformer := informerFactory.Core().V1().Services()
    	serviceIndexer := serviceInformer.Informer().GetIndexer()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:06 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/cmd/upgrade/common.go

    		// Print GET and LIST requests
    		dryRunOpts.PrintGETAndLIST = true
    		fakeclient := apiclient.NewDryRunClientWithOpts(dryRunOpts)
    		// As we know the return of Discovery() of the fake clientset is of type *fakediscovery.FakeDiscovery
    		// we can convert it to that struct.
    		fakeclientDiscovery, ok := fakeclient.Discovery().(*fakediscovery.FakeDiscovery)
    		if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 08:34:39 UTC 2024
    - 10.1K 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