kubernetes/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

// TestValidationExpressions tests CEL integration with custom resource values and OpenAPIv3.
func TestValidationExpressions(t *testing.T) {}

// TestValidationExpressionsInSchema tests CEL integration with custom resource values and OpenAPIv3 for cases
// where the validation rules are defined at any level within the schema.
func TestValidationExpressionsAtSchemaLevels(t *testing.T) {}

func genMatchSelectorSchema(rule string) *schema.Structural {}

func TestCELValidationLimit(t *testing.T) {}

func TestCELValidationContextCancellation(t *testing.T) {}

const maxValidDepth

// TestCELMaxRecursionDepth tests CEL setting for maxRecursionDepth.
func TestCELMaxRecursionDepth(t *testing.T) {}

func TestMessageExpression(t *testing.T) {}

func TestReasonAndFldPath(t *testing.T) {}

func TestValidateFieldPath(t *testing.T) {}

// FixTabsOrDie counts the number of tab characters preceding the first
// line in the given yaml object. It removes that many tabs from every
// line. It panics (it's a test funvion) if some line has fewer tabs
// than the first line.
//
// The purpose of this is to make it easier to read tests.
func FixTabsOrDie(in string) string {}

// Creates a *spec.Schema Schema by decoding the given YAML. Panics on error
func mustSchema(source string) *schema.Structural {}

// Creates an *unstructured by decoding the given YAML. Panics on error
func mustUnstructured(source string) interface{}

type warningRecorder

// AddWarning adds a warning to recorder.
func (r *warningRecorder) AddWarning(agent, text string) {}

func (r *warningRecorder) Warnings() []string {}

func TestRatcheting(t *testing.T) {}

// Runs transition rule cases with OptionalOldSelf set to true on the schema
func TestOptionalOldSelf(t *testing.T) {}

// Shows that type(oldSelf) == null_type works for all supported OpenAPI types
// both when oldSelf is null and when it is not null
func TestOptionalOldSelfCheckForNull(t *testing.T) {}

// Show that we cant just use oldSelf as if it was unwrapped
func TestOptionalOldSelfIsOptionalType(t *testing.T) {}

func genString(n int, c rune) string {}

func setDefaultVerbosity(v int) {}

func BenchmarkCELValidationWithContext(b *testing.B) {}

func BenchmarkCELValidationWithCancelledContext(b *testing.B) {}

// BenchmarkCELValidationWithAndWithoutOldSelfReference measures the additional cost of evaluating
// validation rules that reference "oldSelf".
func BenchmarkCELValidationWithAndWithoutOldSelfReference(b *testing.B) {}

func primitiveType(typ, format string) schema.Structural {}

var integerType

var int32Type

var int64Type

var numberType

var floatType

var doubleType

var stringType

var byteType

var booleanType

var durationFormat

var dateFormat

var dateTimeFormat

func listType(items *schema.Structural) schema.Structural {}

func listTypePtr(items *schema.Structural) *schema.Structural {}

func listSetType(items *schema.Structural) schema.Structural {}

func listMapType(keys []string, items *schema.Structural) schema.Structural {}

func listMapTypePtr(keys []string, items *schema.Structural) *schema.Structural {}

func arrayType(listType string, keys []string, items *schema.Structural) schema.Structural {}

func ValsEqualThemselvesAndDataLiteral(val1, val2 string, dataLiteral string) string {}

func objs(val ...interface{}

func schemas(valSchema ...schema.Structural) *schema.Structural {}

func objectType(props map[string]schema.Structural) schema.Structural {}

func objectTypePtr(props map[string]schema.Structural) *schema.Structural {}

func mapType(valSchema *schema.Structural) schema.Structural {}

func mapTypePtr(valSchema *schema.Structural) *schema.Structural {}

func intOrStringType() schema.Structural {}

func withRule(s schema.Structural, rule string) schema.Structural {}

func withRuleMessageAndMessageExpression(s schema.Structural, rule, message, messageExpression string) schema.Structural {}

func withReasonAndFldPath(s schema.Structural, rule, jsonPath string, reason *apiextensions.FieldValueErrorReason) schema.Structural {}

func withRuleAndMessageExpression(s schema.Structural, rule, messageExpression string) schema.Structural {}

func withRulePtr(s *schema.Structural, rule string) *schema.Structural {}

func cloneWithRule(s *schema.Structural, rule string) *schema.Structural {}

func withMaxLength(s schema.Structural, maxLength *int64) schema.Structural {}

func withMaxItems(s schema.Structural, maxItems *int64) schema.Structural {}

func withMaxProperties(s schema.Structural, maxProperties *int64) schema.Structural {}

func withDefault(dflt interface{}

func withNullable(nullable bool, s schema.Structural) schema.Structural {}

func withNullablePtr(nullable bool, s schema.Structural) *schema.Structural {}

func nilInterfaceOfStringSlice() []interface{}