- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 119 for NewTestContext (0.39 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/bootstrap/util_test.go
}, { "Signing token with no secret", givenTokenID, "", "true", "", false, }, } for _, tc := range cases { t.Run(tc.description, func(t *testing.T) { _, ctx := ktesting.NewTestContext(t) secret := &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Namespace: metav1.NamespaceSystem, Name: bootstrapapi.BootstrapTokenSecretPrefix + givenTokenID, ResourceVersion: "1",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 13 02:18:40 UTC 2023 - 5.3K 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/scheduler/internal/cache/cache_test.go
newHostPortInfoBuilder().build(), make(map[string]*framework.ImageStateSummary), ), }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { logger, ctx := ktesting.NewTestContext(t) ctx, cancel := context.WithCancel(ctx) defer cancel() cache := newCache(ctx, time.Second, time.Second) for _, pod := range tc.pods { if err := cache.AssumePod(logger, pod); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 17 01:38:03 UTC 2023 - 63.8K 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)