Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 160 for oldobj (0.43 sec)

  1. 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)
  2. pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go

    						},
    					},
    				},
    			},
    			oldObj: &v1.Node{
    				Spec: v1.NodeSpec{
    					Unschedulable: true,
    				},
    			},
    			expectedHint: framework.QueueSkip,
    		},
    		{
    			name: "queue-on-unschedulable-field-change",
    			pod:  &v1.Pod{},
    			newObj: &v1.Node{
    				Spec: v1.NodeSpec{
    					Unschedulable: false,
    				},
    			},
    			oldObj: &v1.Node{
    				Spec: v1.NodeSpec{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 16 12:50:11 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. plugin/pkg/admission/certificates/signing/admission_test.go

    		allowed     bool
    		authzErr    error
    	}{
    		"wrong type": {
    			attributes: &testAttributes{
    				resource:    certificatesapi.Resource("certificatesigningrequests"),
    				subresource: "status",
    				oldObj:      &certificatesapi.CertificateSigningRequestList{},
    				obj:         &certificatesapi.CertificateSigningRequestList{},
    				operation:   admission.Update,
    			},
    			allowed: false,
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 28 16:20:40 UTC 2020
    - 8.9K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. pkg/quota/v1/install/update_filter.go

    func DefaultUpdateFilter() func(resource schema.GroupVersionResource, oldObj, newObj interface{}) bool {
    	return func(resource schema.GroupVersionResource, oldObj, newObj interface{}) bool {
    		switch resource.GroupResource() {
    		case schema.GroupResource{Resource: "pods"}:
    			oldPod := oldObj.(*v1.Pod)
    			newPod := newObj.(*v1.Pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 08 22:39:55 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/conversion.go

    	// convert the old and new objects to the requested version
    	versionedAttr := &VersionedAttributes{
    		Attributes:    attr,
    		VersionedKind: gvk,
    	}
    	if oldObj := attr.GetOldObject(); oldObj != nil {
    		out, err := ConvertToGVK(oldObj, gvk, o)
    		if err != nil {
    			return nil, err
    		}
    		versionedAttr.VersionedOldObject = out
    	}
    	if obj := attr.GetObject(); obj != nil {
    		out, err := ConvertToGVK(obj, gvk, o)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 16:56:12 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  8. plugin/pkg/admission/certificates/approval/admission_test.go

    				subresource: "approval",
    				oldObj:      &certificatesapi.CertificateSigningRequestList{},
    				operation:   admission.Update,
    			},
    			allowed: false,
    		},
    		"reject requests if looking up permissions fails": {
    			attributes: &testAttributes{
    				resource:    certificatesapi.Resource("certificatesigningrequests"),
    				subresource: "approval",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 27 15:50:14 UTC 2020
    - 6.3K bytes
    - Viewed (0)
  9. pkg/registry/apps/controllerrevision/strategy.go

    func (strategy) PrepareForUpdate(ctx context.Context, newObj, oldObj runtime.Object) {
    	_ = oldObj.(*apps.ControllerRevision)
    	_ = newObj.(*apps.ControllerRevision)
    }
    
    func (strategy) AllowUnconditionalUpdate() bool {
    	return true
    }
    
    func (strategy) ValidateUpdate(ctx context.Context, newObj, oldObj runtime.Object) field.ErrorList {
    	oldRevision, newRevision := oldObj.(*apps.ControllerRevision), newObj.(*apps.ControllerRevision)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 18 14:42:36 UTC 2021
    - 2.7K bytes
    - Viewed (0)
  10. 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)
Back to top