- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 119 for NewTestContext (0.5 sec)
-
pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go
resources: defaultResources, shape: shape, }, } 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(test.existingPods, test.nodes)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 03:30:06 UTC 2023 - 21.2K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go
}, wantFilterStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonConflict), }, } 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() node := &framework.NodeInfo{} node.SetNode(test.Node) p := &VolumeZone{ pvLister,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Dec 14 05:17:04 UTC 2023 - 20K bytes - Viewed (0) -
pkg/api/job/warnings_test.go
Template: validPodTemplate, }, wantWarningsCount: 1, }, } for name, tc := range cases { t.Run(name, func(t *testing.T) { _, ctx := ktesting.NewTestContext(t) warnings := WarningsForJobSpec(ctx, nil, tc.spec, nil) if len(warnings) != tc.wantWarningsCount { t.Errorf("Got %d warnings, want %d.\nWarnings: %v", len(warnings), tc.wantWarningsCount, warnings) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 14 14:38:42 UTC 2023 - 3.6K 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) -
pkg/kubelet/volumemanager/metrics/metrics_test.go
if err != nil { t.Fatalf("NewBlockVolumeMapper failed. Expected: <no error> Actual: <%v>", err) } // Add one volume to ActualStateOfWorld devicePath := "fake/device/path" logger, _ := ktesting.NewTestContext(t) err = asw.MarkVolumeAsAttached(logger, "", volumeSpec, "", devicePath) if err != nil { t.Fatalf("MarkVolumeAsAttached failed. Expected: <no error> Actual: <%v>", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 00:37:30 UTC 2023 - 4K 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/scheduler/framework/plugins/podtopologyspread/plugin_test.go
expectedHint: framework.Queue, }, } for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { logger, ctx := ktesting.NewTestContext(t) snapshot := cache.NewSnapshot(nil, nil) pl := plugintesting.SetupPlugin(ctx, t, topologySpreadFunc, &config.PodTopologySpreadArgs{DefaultingType: config.ListDefaulting}, snapshot) p := pl.(*PodTopologySpread)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 17 06:30:53 UTC 2023 - 13K bytes - Viewed (0) -
pkg/test/framework/testcontext.go
*testing.T // suite-level context suite *suiteContext // resource scope for this context. scope *scope // The workDir for this particular context workDir string } func newTestContext(test *testImpl, goTest *testing.T, s *suiteContext, parentScope *scope, labels label.Set) *testContext { id := s.allocateContextID(goTest.Name()) allLabels := s.suiteLabels.Merge(labels)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 22:02:59 UTC 2024 - 11.4K bytes - Viewed (0)