Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 119 for NewTestContext (0.17 sec)

  1. pkg/scheduler/framework/preemption/preemption_test.go

    							NumPDBViolations: 1,
    						},
    						name: "node2",
    					},
    				},
    			},
    		},
    	}
    
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			logger, _ := ktesting.NewTestContext(t)
    			registeredPlugins := append([]tf.RegisterPluginFunc{
    				tf.RegisterQueueSortPlugin(queuesort.Name, queuesort.New)},
    				tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
    			)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    				{Name: "nodeA", Score: framework.MaxNodeScore},
    				{Name: "nodeB", Score: 0},
    			},
    		},
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			snapshot := cache.NewSnapshot(nil, test.nodes)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/noderesources/fit_test.go

    			test.nodeInfo.SetNode(&node)
    
    			if test.args.ScoringStrategy == nil {
    				test.args.ScoringStrategy = defaultScoringStrategy
    			}
    
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			p, err := NewFit(ctx, &test.args, nil, plfeature.Features{})
    			if err != nil {
    				t.Fatal(err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 57.4K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/volumebinding/binder_test.go

    			Name: "node1",
    			Labels: map[string]string{
    				nodeLabelKey: "node1",
    			},
    		},
    	}
    
    	run := func(t *testing.T, scenario scenarioType, csiDriver *storagev1.CSIDriver) {
    		logger, ctx := ktesting.NewTestContext(t)
    		ctx, cancel := context.WithCancel(ctx)
    		defer cancel()
    
    		// Setup
    		testEnv := newTestBinder(t, ctx)
    		testEnv.initVolumes(scenario.pvs, scenario.pvs)
    		if csiDriver != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 09:46:58 UTC 2024
    - 82.8K bytes
    - Viewed (0)
  5. pkg/controller/volume/attachdetach/attach_detach_controller_test.go

    	// Arrange
    	fakeKubeClient := controllervolumetesting.CreateTestClient()
    	informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, controller.NoResyncPeriodFunc())
    
    	logger, tCtx := ktesting.NewTestContext(t)
    	adc := createADC(t, tCtx, fakeKubeClient, informerFactory, controllervolumetesting.CreateTestPlugin())
    
    	// Act
    	informerFactory.Start(tCtx.Done())
    	informerFactory.WaitForCacheSync(tCtx.Done())
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 11:00:37 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  6. pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go

    			if err != nil {
    				t.Fatal(err)
    			}
    
    			fn := func() ([]*metav1.APIResourceList, error) {
    				return resources, testInput.gvrError
    			}
    			_, ctx := ktesting.NewTestContext(t)
    			d := NewNamespacedResourcesDeleter(ctx, mockClient.CoreV1().Namespaces(), metadataClient, mockClient.CoreV1(), fn, v1.FinalizerKubernetes)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 07:34:23 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/interpodaffinity/plugin_test.go

    			expectedHint: framework.Queue,
    		},
    	}
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			logger, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			snapshot := cache.NewSnapshot(nil, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 03:08:44 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  8. pkg/controller/nodelifecycle/node_lifecycle_controller_test.go

    				testutil.CreateZoneID("region1", "zone1"): stateFullDisruption,
    			},
    		},
    	}
    
    	for testName, tt := range tests {
    		t.Run(testName, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			fakeNodeHandler := &testutil.FakeNodeHandler{
    				Existing:  tt.nodeList,
    				Clientset: fake.NewSimpleClientset(),
    			}
    			nodeController, _ := newNodeLifecycleControllerFromClient(
    				ctx,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 03:26:45 UTC 2024
    - 119K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/nodevolumelimits/non_csi_test.go

    			maxVols:          1,
    			test:             "don't skip Filter when the pods has ephemeral volumes",
    		},
    	}
    
    	for _, test := range tests {
    		t.Run(test.test, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			fts := feature.Features{}
    			node, csiNode := getNodeWithPodAndVolumeLimits("node", test.existingPods, test.maxVols, filterName)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 30 23:00:56 UTC 2023
    - 36.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress_test.go

    )
    
    var (
    	pollPeriod      = time.Millisecond
    	minimalNoChange = 20 * time.Millisecond
    	pollTimeout     = 5 * time.Second
    )
    
    func TestConditionalProgressRequester(t *testing.T) {
    	_, ctx := ktesting.NewTestContext(t)
    	logger := klog.FromContext(ctx)
    
    	clock := testingclock.NewFakeClock(time.Now())
    	pr := newTestConditionalProgressRequester(clock)
    	stopCh := make(chan struct{})
    	go pr.Run(stopCh)
    	var wantRequestsSent int32
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:51:06 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top