- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for NewTestContext (0.22 sec)
-
pkg/controller/statefulset/stateful_set_test.go
var parentKind = apps.SchemeGroupVersion.WithKind("StatefulSet") func alwaysReady() bool { return true } func TestStatefulSetControllerCreates(t *testing.T) { set := newStatefulSet(3) logger, ctx := ktesting.NewTestContext(t) ssc, spc, om, _ := newFakeStatefulSetController(ctx, set) if err := scaleUpStatefulSetController(logger, set, ssc, spc, om); err != nil { t.Errorf("Failed to turn up StatefulSet : %s", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 33.1K bytes - Viewed (0) -
pkg/controller/disruption/disruption_test.go
t.Fatalf("Could not add %+v to %+v: %v", obj, store, err) } } // Create one with no selector. Verify it matches all pods func TestNoSelector(t *testing.T) { _, ctx := ktesting.NewTestContext(t) dc, ps := newFakeDisruptionController(ctx) pdb, pdbName := newMinAvailablePodDisruptionBudget(t, intstr.FromInt32(3)) pdb.Spec.Selector = &metav1.LabelSelector{} pod, _ := newPod(t, "yo-yo-yo")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 50K bytes - Viewed (0) -
pkg/controller/volume/attachdetach/cache/actual_state_of_world_test.go
volumeSpec := controllervolumetesting.GetTestVolumeSpec(string(volumeName), volumeName) nodeName := types.NodeName("node-name") devicePath := "fake/device/path" // Act logger, _ := ktesting.NewTestContext(t) generatedVolumeName, err := asw.AddVolumeNode(logger, volumeName, volumeSpec, nodeName, devicePath, true) // Assert if err != nil { t.Fatalf("AddVolumeNode failed. Expected: <no error> Actual: <%v>", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 11 07:35:17 UTC 2024 - 66.1K bytes - Viewed (0) -
pkg/controller/deployment/deployment_controller_test.go
action.Matches("watch", "replicasets")) { continue } ret = append(ret, action) } return ret } func TestSyncDeploymentCreatesReplicaSet(t *testing.T) { _, ctx := ktesting.NewTestContext(t) f := newFixture(t) d := newDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"}) f.dLister = append(f.dLister, d) f.objects = append(f.objects, d)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 32.5K bytes - Viewed (0) -
pkg/controller/daemon/daemon_controller_test.go
} } } func TestDaemonSetPodCreateExpectationsError(t *testing.T) { logger, _ := ktesting.NewTestContext(t) strategies := updateStrategies() for _, strategy := range strategies { ds := newDaemonSet("foo") ds.Spec.UpdateStrategy = *strategy _, ctx := ktesting.NewTestContext(t) manager, podControl, _, err := newTestController(ctx, ds) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 111.4K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/volumebinding/assume_cache_test.go
if err != nil { return err } if pv != expectedPV { return fmt.Errorf("GetPV() returned %p, expected %p", pv, expectedPV) } return nil } func TestAssumePV(t *testing.T) { logger, _ := ktesting.NewTestContext(t) scenarios := map[string]struct { oldPV *v1.PersistentVolume newPV *v1.PersistentVolume shouldSucceed bool }{ "success-same-version": {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 09:46:58 UTC 2024 - 12.8K bytes - Viewed (0) -
pkg/controller/daemon/update_test.go
podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/controller/daemon/util" testingclock "k8s.io/utils/clock/testing" ) func TestDaemonSetUpdatesPods(t *testing.T) { _, ctx := ktesting.NewTestContext(t) ds := newDaemonSet("foo") manager, podControl, _, err := newTestController(ctx, ds) if err != nil { t.Fatalf("error creating DaemonSets controller: %v", err) } maxUnavailable := 2
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 10 21:10:35 UTC 2024 - 28.9K bytes - Viewed (0) -
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/volume/util/operationexecutor/operation_executor_test.go
PersistentVolume: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}, }, }, }, } logger, _ := ktesting.NewTestContext(t) oe.AttachVolume(logger, volumesToAttach[i], nil /* actualStateOfWorldAttacherUpdater */) } // Assert if !isOperationRunSerially(ch, quit) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 14 06:17:25 UTC 2024 - 26.9K 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)