- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ValidateLeaseSpec (0.2 sec)
-
pkg/apis/coordination/validation/validation.go
allErrs = append(allErrs, ValidateLeaseSpec(&lease.Spec, field.NewPath("spec"))...) return allErrs } // ValidateLeaseSpec validates spec of Lease. func ValidateLeaseSpec(spec *coordination.LeaseSpec, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if spec.LeaseDurationSeconds != nil && *spec.LeaseDurationSeconds <= 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 03 17:25:43 UTC 2022 - 2K bytes - Viewed (0) -
pkg/apis/coordination/validation/validation_test.go
leaseTransitions := int32(-1) spec := &coordination.LeaseSpec{ HolderIdentity: &holder, LeaseDurationSeconds: &leaseDuration, LeaseTransitions: &leaseTransitions, } errs := ValidateLeaseSpec(spec, field.NewPath("foo")) if len(errs) != 2 { t.Errorf("unexpected list of errors: %#v", errs.ToAggregate().Error()) } } func TestValidateLeaseSpecUpdate(t *testing.T) { holder := "holder"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 02 02:22:52 UTC 2018 - 2.9K bytes - Viewed (0)