Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for oldObj (0.1 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. 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)
  6. 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)
  7. 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)
  8. 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)
  9. plugin/pkg/admission/storage/persistentvolume/resize/admission_test.go

    		name        string
    		resource    schema.GroupVersionResource
    		subresource string
    		oldObj      runtime.Object
    		newObj      runtime.Object
    
    		checkError func(error) bool
    	}{
    		{
    			name:     "pvc-resize, update, no error",
    			resource: api.SchemeGroupVersion.WithResource("persistentvolumeclaims"),
    			oldObj: &api.PersistentVolumeClaim{
    				Spec: api.PersistentVolumeClaimSpec{
    					VolumeName: "volume1",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 21 13:31:28 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  10. 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)
Back to top