- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 59 for NewTestContext (0.17 sec)
-
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) -
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) -
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) -
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) -
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) -
pkg/controller/podgc/gc_controller_test.go
}, threshold: 1, deletedPodNames: sets.New("c"), }, } for _, test := range testCases { t.Run(test.name, func(t *testing.T) { resetMetrics() _, ctx := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.PodDisruptionConditions, test.enablePodDisruptionConditions) creationTime := time.Unix(0, 0)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 08:16:48 UTC 2024 - 29K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/fieldselector_test.go
} func (sf selectableFieldTestCase) Name() string { return fmt.Sprintf("%s/%s", sf.version, sf.fieldSelector) } func TestSelectableFields(t *testing.T) { _, ctx := ktesting.NewTestContext(t) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, apiextensionsfeatures.CustomResourceFieldSelectors, true)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 06 15:53:03 UTC 2024 - 27K bytes - Viewed (0) -
pkg/controller/deployment/progress_test.go
), } dc.enqueueDeployment = dc.enqueue for _, test := range tests { t.Run(test.name, func(t *testing.T) { if test.nowFn != nil { nowFn = test.nowFn } _, ctx := ktesting.NewTestContext(t) ctx, cancel := context.WithCancel(ctx) defer cancel() got := dc.requeueStuckDeployment(ctx, test.d, test.status) if got != test.expected {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 13.3K bytes - Viewed (0) -
pkg/controller/volume/persistentvolume/pv_controller_test.go
errors: noerrors, test: func(ctrl *PersistentVolumeController, reactor *pvtesting.VolumeReactor, test controllerTest) error { return nil }, }, } logger, ctx := ktesting.NewTestContext(t) doit := func(test controllerTest) { // Initialize the controller client := &fake.Clientset{} fakeVolumeWatch := watch.NewFake()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 43.4K bytes - Viewed (0) -
pkg/controller/nodeipam/ipam/range_allocator_test.go
SecondaryServiceCIDR: nil, NodeCIDRMaskSizes: []int{24}, }, expectedAllocatedCIDR: map[int]string{ 0: "10.10.1.0/24", }, }, } // test function _, tCtx := ktesting.NewTestContext(t) testFunc := func(tc testCase) { fakeNodeInformer := test.FakeNodeInformer(tc.fakeNodeHandler) nodeList, _ := tc.fakeNodeHandler.List(tCtx, metav1.ListOptions{}) // Initialize the range allocator.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 10:06:15 UTC 2024 - 25.2K bytes - Viewed (0)