- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for NewTestContext (0.59 sec)
-
pkg/controller/statefulset/stateful_pod_control_test.go
} else if !strings.Contains(events[1], v1.EventTypeWarning) { t.Errorf("Found unexpected non-warning event %s", events[1]) } } func TestStatefulPodControlNoOpUpdate(t *testing.T) { _, ctx := ktesting.NewTestContext(t) recorder := record.NewFakeRecorder(10) set := newStatefulSet(3) pod := newStatefulSetPod(set, 0) fakeClient := &fake.Clientset{} claims := getPersistentVolumeClaims(set, pod)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 05 19:06:41 UTC 2024 - 35.5K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates_test.go
want: framework.NewStatus(framework.UnschedulableAndUnresolvable, "waiting for scheduling gates: [foo bar]"), }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { _, ctx := ktesting.NewTestContext(t) p, err := New(ctx, nil, nil, feature.Features{}) if err != nil { t.Fatalf("Creating plugin: %v", err) } got := p.(framework.PreEnqueuePlugin).PreEnqueue(ctx, tt.pod)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 13:26:09 UTC 2024 - 3.7K bytes - Viewed (0) -
pkg/scheduler/internal/queue/scheduling_queue_test.go
logger, _ := ktesting.NewTestContext(t) err := q.AddUnschedulableIfNotPresent(logger, poppedPod, q.SchedulingCycle()) if err != nil { t.Fatalf("unexpected error from AddUnschedulableIfNotPresent: %v", err) } }}, {callback: func(t *testing.T, q *PriorityQueue) { logger, _ := ktesting.NewTestContext(t)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 13:26:09 UTC 2024 - 146.9K bytes - Viewed (0) -
pkg/controller/endpointslice/endpointslice_controller_test.go
endpointSlice.Generation++ esIndexer.Update(endpointSlice) return false, endpointSlice, nil })) _, ctx := ktesting.NewTestContext(t) esController := NewController( ctx, informerFactory.Core().V1().Pods(), informerFactory.Core().V1().Services(), nodeInformer, esInformer, int32(100), client, batchPeriod)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 08:33:32 UTC 2024 - 65.5K bytes - Viewed (0) -
pkg/controller/job/job_controller_test.go
} } type jobInitialStatus struct { active int succeed int failed int startTime *time.Time } func TestControllerSyncJob(t *testing.T) { _, ctx := ktesting.NewTestContext(t) jobConditionComplete := batch.JobComplete jobConditionFailed := batch.JobFailed jobConditionSuspended := batch.JobSuspended referenceTime := time.Now() testCases := map[string]struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 15:36:36 UTC 2024 - 229.2K 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/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/reconciler/reconstruct_test.go
rcInstance, _ := rc.(*reconciler) rcInstance.volumesFailedReconstruction = tc.volumesFailedReconstruction logger, _ := ktesting.NewTestContext(t) for _, tpodInfo := range tc.podInfos { pod := getInlineFakePod(tpodInfo.podName, tpodInfo.podUID, tpodInfo.outerVolumeName, tpodInfo.innerVolumeName) volumeSpec := &volume.Spec{Volume: &pod.Spec.Volumes[0]}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:25:43 UTC 2024 - 14.8K bytes - Viewed (0) -
pkg/controller/statefulset/stateful_set_utils_test.go
for _, tc := range testCases { for _, useOtherRefs := range []bool{false, true} { for _, setPodRef := range []bool{false, true} { for _, setSetRef := range []bool{false, true} { _, ctx := ktesting.NewTestContext(t) logger := klog.FromContext(ctx) claim := v1.PersistentVolumeClaim{} claim.Name = "target-claim" pod := v1.Pod{} pod.Name = fmt.Sprintf("pod-%d", tc.ordinal)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 05 19:06:41 UTC 2024 - 50.9K bytes - Viewed (0)