Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for validateOverhead (0.21 sec)

  1. pkg/apis/core/validation/validation.go

    	for _, msg := range apimachineryvalidation.NameIsDNSSubdomain(name, false) {
    		allErrs = append(allErrs, field.Invalid(fldPath, name, msg))
    	}
    	return allErrs
    }
    
    // validateOverhead can be used to check whether the given Overhead is valid.
    func validateOverhead(overhead core.ResourceList, fldPath *field.Path, opts PodValidationOptions) field.ErrorList {
    	// reuse the ResourceRequirements validation logic
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 349.5K bytes
    - Viewed (0)
  2. pkg/apis/core/validation/validation_test.go

    			core.ResourceName(core.ResourceCPU):    resource.MustParse("10"),
    			core.ResourceName(core.ResourceMemory): resource.MustParse("10G"),
    		},
    	},
    	}
    	for _, tc := range successCase {
    		if errs := validateOverhead(tc.overhead, field.NewPath("overheads"), PodValidationOptions{}); len(errs) != 0 {
    			t.Errorf("%q unexpected error: %v", tc.Name, errs)
    		}
    	}
    
    	errorCase := []struct {
    		Name     string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
Back to top