- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 106 for oldobj (0.11 sec)
-
pkg/scheduler/util/assumecache/assume_cache_test.go
// Assume new object. if err := cache.Assume(newObj); err != nil { t.Fatalf("Assume() returned error %v", err) } verify(ktesting.WithStep(tCtx, "after Assume"), cache, oldObj.GetName(), newObj, oldObj) // Restore object. cache.Restore(oldObj.GetName()) verify(ktesting.WithStep(tCtx, "after second Restore"), cache, oldObj.GetName(), oldObj, oldObj) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 09:46:58 UTC 2024 - 9.5K bytes - Viewed (0) -
pkg/registry/networking/servicecidr/strategy_test.go
if len(errors) != 2 { t.Errorf("Expected 2 validation errors for invalid object, got %d", len(errors)) } oldObj := newServiceCIDR() newObj := oldObj.DeepCopy() newObj.Spec.CIDRs = []string{"bad cidr"} errors = Strategy.ValidateUpdate(context.TODO(), newObj, oldObj) if len(errors) != 2 { t.Errorf("Expected 2 validation errors for invalid update, got %d", len(errors)) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jan 04 15:09:29 UTC 2024 - 2.8K bytes - Viewed (0) -
plugin/pkg/admission/gc/gc_admission_test.go
username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{}, newObj: &api.Pod{}, checkError: expectNoError, }, { name: "super-user, update, no objectref change two", username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 21:28:42 UTC 2024 - 24.5K bytes - Viewed (0) -
pkg/registry/core/persistentvolume/strategy_test.go
defer func() { NowFunc = metav1.Now }() tests := []struct { name string fg bool oldObj *api.PersistentVolume newObj *api.PersistentVolume expectedObj *api.PersistentVolume }{ { name: "feature enabled: timestamp is updated when phase changes", fg: true, oldObj: &api.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: "foo", },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 11K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates_test.go
}) } } func Test_isSchedulableAfterPodChange(t *testing.T) { testcases := map[string]struct { pod *v1.Pod oldObj, newObj interface{} expectedHint framework.QueueingHint expectedErr bool }{ "backoff-wrong-old-object": { pod: &v1.Pod{}, oldObj: "not-a-pod", expectedHint: framework.Queue, expectedErr: true, }, "backoff-wrong-new-object": {
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/kube/controllers/common.go
UpdateFunc: func(oldInterface, newInterface any) { oldObj := ExtractObject(oldInterface) if oldObj == nil { return } newObj := ExtractObject(newInterface) if newObj == nil { return } if onlyIncludeSpecChanges && oldObj.GetResourceVersion() == newObj.GetResourceVersion() { return } newer := filter(newObj) older := filter(oldObj) if !newer && !older { return }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 11 08:27:29 UTC 2024 - 8.9K bytes - Viewed (0) -
pkg/proxy/config/config.go
func (c *ServiceCIDRConfig) handleServiceCIDREvent(oldObj, newObj interface{}) { var oldServiceCIDR, newServiceCIDR *networkingv1alpha1.ServiceCIDR var ok bool if oldObj != nil { oldServiceCIDR, ok = oldObj.(*networkingv1alpha1.ServiceCIDR) if !ok { utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", oldObj)) return } } if newObj != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 22 05:08:41 UTC 2024 - 15.1K bytes - Viewed (0) -
plugin/pkg/auth/authorizer/node/graph_populator.go
g.updateVolumeAttachment(nil, obj) } func (g *graphPopulator) updateVolumeAttachment(oldObj, obj interface{}) { attachment := obj.(*storagev1.VolumeAttachment) if oldObj != nil { // skip add if node name is identical oldAttachment := oldObj.(*storagev1.VolumeAttachment) if oldAttachment.Spec.NodeName == attachment.Spec.NodeName { return } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 21:22:55 UTC 2024 - 6.5K bytes - Viewed (0) -
pkg/registry/certificates/certificates/strategy_test.go
}() tests := []struct { name string newObj *certapi.CertificateSigningRequest oldObj *certapi.CertificateSigningRequest expectedObj *certapi.CertificateSigningRequest }{ { name: "no-op", newObj: &certapi.CertificateSigningRequest{}, oldObj: &certapi.CertificateSigningRequest{}, expectedObj: &certapi.CertificateSigningRequest{}, }, {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 15 14:34:53 UTC 2024 - 7.6K bytes - Viewed (0) -
plugin/pkg/admission/certificates/ctbattest/admission_test.go
clusterTrustBundleFeatureEnabled: true, allowedName: "abc.com/xyz", attributes: &testAttributes{ resource: certificatesapi.Resource("clustertrustbundles"), oldObj: &certificatesapi.ClusterTrustBundle{ Spec: certificatesapi.ClusterTrustBundleSpec{}, }, obj: &certificatesapi.ClusterTrustBundle{ Spec: certificatesapi.ClusterTrustBundleSpec{}, },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 10.9K bytes - Viewed (0)