- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 117 for ValidateUpdate (0.22 sec)
-
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/ratcheting_test.go
}, } func TestScalarRatcheting(t *testing.T) { validator := validation.NewRatchetingSchemaValidator(mediumIntSchema, nil, "", strfmt.Default) require.True(t, validator.ValidateUpdate(1, 1, validation.WithRatcheting(nil)).IsValid()) require.False(t, validator.ValidateUpdate(1, 2, validation.WithRatcheting(nil)).IsValid()) } var objectSchema *spec.Schema = &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: spec.StringOrArray{"object"},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 24 18:20:09 UTC 2023 - 4K bytes - Viewed (0) -
pkg/registry/policy/poddisruptionbudget/strategy_test.go
Strategy.PrepareForUpdate(ctx, newPdb, pdb) errs = Strategy.ValidateUpdate(ctx, newPdb, pdb) if len(errs) != 0 { t.Errorf("Unexpected error updating PodDisruptionBudget.") } // Changing the selector? OK newPdb.Spec.Selector = &metav1.LabelSelector{MatchLabels: map[string]string{"a": "bar"}} Strategy.PrepareForUpdate(ctx, newPdb, pdb) errs = Strategy.ValidateUpdate(ctx, newPdb, pdb) if len(errs) != 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 19.2K bytes - Viewed (0) -
pkg/registry/core/replicationcontroller/strategy_test.go
errs := Strategy.ValidateUpdate(ctx, newController, oldController) if len(errs) > 0 { t.Fatalf("unexpected errors: %v", errs) } // Update the selector - validation should return an error. newController.Spec.Selector["shiny"] = "newlabel" newController.Spec.Template.Labels["shiny"] = "newlabel" errs = Strategy.ValidateUpdate(ctx, newController, oldController) for _, err := range errs {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 13 16:56:29 UTC 2019 - 6.9K bytes - Viewed (0) -
pkg/registry/networking/ingress/strategy.go
} // AllowCreateOnUpdate is false for Ingress; this means POST is needed to create one. func (ingressStrategy) AllowCreateOnUpdate() bool { return false } // ValidateUpdate validates ingresses on update. func (ingressStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { return validation.ValidateIngressUpdate(obj.(*networking.Ingress), old.(*networking.Ingress)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 01:42:41 UTC 2023 - 6.1K bytes - Viewed (0) -
pkg/registry/networking/servicecidr/strategy.go
func (serviceCIDRStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { return nil } // ValidateUpdate is the default update validation for an end user. func (serviceCIDRStrategy) ValidateUpdate(ctx context.Context, new, old runtime.Object) field.ErrorList { newServiceCIDR := new.(*networking.ServiceCIDR) oldServiceCIDR := old.(*networking.ServiceCIDR)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 5.4K bytes - Viewed (0) -
pkg/registry/resource/resourceclassparameters/strategy_test.go
newObj := resourceClassParameters.DeepCopy() newObj.ResourceVersion = "4" Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters) errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters) if len(errs) != 0 { t.Errorf("unexpected validation errors: %v", errs) } }) t.Run("name-change-not-allowed", func(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 15:15:31 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/registry/networking/ingressclass/strategy_test.go
t.Errorf("Unexpected error from validation for IngressClass: %v", errs) } newIngressClass := ingressClass.DeepCopy() Strategy.PrepareForUpdate(ctx, newIngressClass, &ingressClass) errs = Strategy.ValidateUpdate(ctx, newIngressClass, &ingressClass) if len(errs) != 0 { t.Errorf("Unexpected error from update validation for IngressClass: %v", errs) } ingressClass.Name = "invalid/name"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 10 16:58:39 UTC 2021 - 2.1K bytes - Viewed (0) -
pkg/registry/admissionregistration/validatingadmissionpolicy/strategy.go
func (v *validatingAdmissionPolicyStrategy) AllowCreateOnUpdate() bool { return false } // ValidateUpdate is the default update validation for an end user. func (v *validatingAdmissionPolicyStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 7.8K bytes - Viewed (0) -
pkg/registry/resource/resourceclaim/strategy_test.go
resourceClaim := resourceClaim.DeepCopy() newClaim := resourceClaim.DeepCopy() newClaim.ResourceVersion = "4" Strategy.PrepareForUpdate(ctx, newClaim, resourceClaim) errs := Strategy.ValidateUpdate(ctx, newClaim, resourceClaim) if len(errs) != 0 { t.Errorf("unexpected validation errors: %v", errs) } }) t.Run("name-change-not-allowed", func(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 10 19:08:24 UTC 2022 - 2.4K bytes - Viewed (0) -
pkg/registry/resource/resourceclass/strategy_test.go
resourceClass := resourceClass.DeepCopy() newClass := resourceClass.DeepCopy() newClass.ResourceVersion = "4" Strategy.PrepareForUpdate(ctx, newClass, resourceClass) errs := Strategy.ValidateUpdate(ctx, newClass, resourceClass) if len(errs) != 0 { t.Errorf("unexpected validation errors: %v", errs) } }) t.Run("name-change-not-allowed", func(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 10 19:08:24 UTC 2022 - 2.3K bytes - Viewed (0)