Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for PrepareForUpdate (0.33 sec)

  1. pkg/registry/core/service/strategy_test.go

    				},
    			},
    		},
    	}
    	StatusStrategy.PrepareForUpdate(ctx, newService, oldService)
    	if newService.Status.LoadBalancer.Ingress[0].IP != "127.0.0.2" {
    		t.Errorf("Service status updates should allow change of status fields")
    	}
    	if newService.Spec.SessionAffinity != "None" {
    		t.Errorf("PrepareForUpdate should have preserved old spec")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 32.4K bytes
    - Viewed (0)
  2. pkg/api/pod/util.go

    }
    
    // DropDisabledTemplateFields removes disabled fields from the pod template metadata and spec.
    // This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a PodTemplateSpec
    func DropDisabledTemplateFields(podTemplate, oldPodTemplate *api.PodTemplateSpec) {
    	var (
    		podSpec           *api.PodSpec
    		podAnnotations    map[string]string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 41.3K bytes
    - Viewed (0)
  3. pkg/registry/discovery/endpointslice/strategy_test.go

    				},
    				Endpoints: []discovery.Endpoint{{
    					Addresses: []string{"1.2.3.4"},
    				}},
    			},
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			Strategy.PrepareForUpdate(context.TODO(), tc.newEPS, tc.oldEPS)
    			if !apiequality.Semantic.DeepEqual(tc.newEPS, tc.expectedEPS) {
    				t.Errorf("Expected %+v\nGot: %+v", tc.expectedEPS, tc.newEPS)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  4. pkg/registry/batch/job/strategy_test.go

    	"k8s.io/kubernetes/pkg/features"
    	"k8s.io/utils/ptr"
    )
    
    var ignoreErrValueDetail = cmpopts.IgnoreFields(field.Error{}, "BadValue", "Detail")
    
    // TestJobStrategy_PrepareForUpdate tests various scenarios for PrepareForUpdate
    func TestJobStrategy_PrepareForUpdate(t *testing.T) {
    	validSelector := getValidLabelSelector()
    	validPodTemplateSpec := getValidPodTemplateSpecForSelector(validSelector)
    
    	podFailurePolicy := &batch.PodFailurePolicy{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 101.5K bytes
    - Viewed (0)
  5. pkg/registry/core/pod/strategy_test.go

    	updatedPod.ResourceVersion = "2"
    
    	errs = Strategy.ValidateUpdate(ctx, updatedPod, createdPod)
    	if len(errs) != 0 {
    		t.Errorf("Unexpected error: %v", errs.ToAggregate())
    	}
    
    	Strategy.PrepareForUpdate(ctx, updatedPod, createdPod)
    
    	if len(updatedPod.Spec.TopologySpreadConstraints) != 1 ||
    		*updatedPod.Spec.TopologySpreadConstraints[0].NodeAffinityPolicy != ignore ||
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 76.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go

    	}
    	labels := metaObj.GetLabels()
    	if labels == nil {
    		labels = map[string]string{}
    	}
    	labels["prepare_create"] = "true"
    	metaObj.SetLabels(labels)
    }
    
    func (t *testRESTStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {}
    func (t *testRESTStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
    	return nil
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 101.8K bytes
    - Viewed (0)
Back to top