test

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatorsFromFile

func ValidatorsFromFile(t *testing.T, crdFilePath string) (validatorsByVersionByJSONPath map[string]map[string]CELValidateFunc)

ValidatorsFromFile extracts the CEL validators by version and JSONPath from a CRD file and returns a validator func for testing against samples.

Types

type CELValidateFunc

type CELValidateFunc func(obj, old interface{}) field.ErrorList

CELValidateFunc tests a sample object against a CEL validator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL