Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 70 for newobj (0.11 sec)

  1. pkg/registry/resource/resourceclassparameters/strategy_test.go

    		ctx := genericapirequest.NewDefaultContext()
    		resourceClassParameters := resourceClassParameters.DeepCopy()
    		newObj := resourceClassParameters.DeepCopy()
    		newObj.Name += "-2"
    		newObj.ResourceVersion = "4"
    
    		Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters)
    		errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters)
    		if len(errs) == 0 {
    			t.Errorf("expected a validation error")
    		}
    	})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 15:15:31 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/equality.go

    // if the non-managed parts of the object are equivalent
    func IgnoreManagedFieldsTimestampsTransformer(
    	_ context.Context,
    	newObj runtime.Object,
    	oldObj runtime.Object,
    ) (res runtime.Object, err error) {
    	equalities := getAvoidTimestampEqualities()
    	if len(equalities.Equalities) == 0 {
    		return newObj, nil
    	}
    
    	outcome := "unequal_objects_fast"
    	start := time.Now()
    	err = nil
    	res = nil
    
    	defer func() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 28 14:56:34 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  3. pkg/scheduler/util/assumecache/assume_cache_test.go

    	verify(ktesting.WithStep(tCtx, "after nop add"), cache, key, newObj, newObj)
    	informer.add(nil)
    	verify(ktesting.WithStep(tCtx, "after nil add"), cache, key, newObj, newObj)
    	informer.update(oldObj)
    	verify(ktesting.WithStep(tCtx, "after nop update"), cache, key, newObj, newObj)
    	informer.update(nil)
    	verify(ktesting.WithStep(tCtx, "after nil update"), cache, key, newObj, newObj)
    	informer.delete(nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 09:46:58 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go

    		pod            *v1.Pod
    		oldObj, newObj interface{}
    		expectedHint   framework.QueueingHint
    		expectedErr    bool
    	}{
    		{
    			name:         "backoff-wrong-new-object",
    			pod:          &v1.Pod{},
    			newObj:       "not-a-node",
    			expectedHint: framework.Queue,
    			expectedErr:  true,
    		},
    		{
    			name: "backoff-wrong-old-object",
    			pod:  &v1.Pod{},
    			newObj: &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)
  5. pkg/registry/networking/servicecidr/strategy_test.go

    	newObj := &networking.ServiceCIDR{
    		Spec: networking.ServiceCIDRSpec{
    			CIDRs: []string{"10.10.0.0/16"},
    		},
    	}
    	StatusStrategy.PrepareForUpdate(context.TODO(), newObj, oldObj)
    	if !reflect.DeepEqual(newObj.Spec, networking.ServiceCIDRSpec{}) {
    		t.Errorf("Expected spec field to be preserved from old object during status update")
    	}
    
    	newObj = &networking.ServiceCIDR{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 04 15:09:29 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/fieldmanager.go

    // object.
    func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (object runtime.Object, err error) {
    	// First try to decode the managed fields provided in the update,
    	// This is necessary to allow directly updating managed fields.
    	isSubresource := f.subresource != ""
    	managed, err := decodeLiveOrNew(liveObj, newObj, isSubresource)
    	if err != nil {
    		return newObj, nil
    	}
    
    	RemoveObjectManagedFields(newObj)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 16 20:03:48 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  7. 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)
    			return core.QuotaV1Pod(oldPod, clock.RealClock{}) && !core.QuotaV1Pod(newPod, clock.RealClock{})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 08 22:39:55 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  8. pkg/registry/resource/resourceclaimparameters/strategy_test.go

    		ctx := genericapirequest.NewDefaultContext()
    		resourceClaimParameters := resourceClaimParameters.DeepCopy()
    		newObj := resourceClaimParameters.DeepCopy()
    		newObj.Name += "-2"
    		newObj.ResourceVersion = "4"
    
    		Strategy.PrepareForUpdate(ctx, newObj, resourceClaimParameters)
    		errs := Strategy.ValidateUpdate(ctx, newObj, resourceClaimParameters)
    		if len(errs) == 0 {
    			t.Errorf("expected a validation error")
    		}
    	})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 15:15:31 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  9. plugin/pkg/admission/storage/persistentvolume/resize/admission_test.go

    			"the storageclass that provisions the pvc must support resize")
    	}
    	tests := []struct {
    		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"),
    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. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/skipnonapplied.go

    		if len(accessor.GetUID()) == 0 {
    			if f.probability <= rand.Float32() {
    				return newObj, managed, nil
    			}
    		} else {
    			return newObj, managed, nil
    		}
    	}
    	return f.fieldManager.Update(liveObj, newObj, managed, manager)
    }
    
    // Apply implements Manager.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 16 20:03:48 UTC 2023
    - 3.3K bytes
    - Viewed (0)
Back to top