Documentation ¶
Index ¶
- func DescribeErrorCases[T core_model.Resource](generator func() T, cases ...TableEntry)
- func DescribeValidCases[T core_model.Resource](generator func() T, cases ...TableEntry)
- func ErrorCase(description string, err validators.Violation, yaml string) TableEntry
- func ErrorCases(description string, errs []validators.Violation, yaml string) TableEntry
- func Global() registry.TypeRegistry
- type ResourceGenerator
- type ResourceValidationCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DescribeErrorCases ¶
func DescribeErrorCases[T core_model.Resource](generator func() T, cases ...TableEntry)
DescribeErrorCases creates a Ginkgo table test for the given entries, where each entry is a ResourceValidationCase that contains an invalid resource YAML and the corresponding validation error.
func DescribeValidCases ¶
func DescribeValidCases[T core_model.Resource](generator func() T, cases ...TableEntry)
DescribeValidCases creates a Ginkgo table test for the given entries, where each entry is a valid YAML resource. It ensures that each entry can be successfully validated.
func ErrorCase ¶
func ErrorCase(description string, err validators.Violation, yaml string) TableEntry
ErrorCase is a helper that generates a table entry for DescribeErrorCases.
func ErrorCases ¶
func ErrorCases(description string, errs []validators.Violation, yaml string) TableEntry
func Global ¶
func Global() registry.TypeRegistry
Types ¶
type ResourceGenerator ¶
type ResourceGenerator interface {
New() core_model.Resource
}
ResourceGenerator creates a resource of a pre-defined type.
type ResourceValidationCase ¶
type ResourceValidationCase struct { Resource string Violations []validators.Violation }
ResourceValidationCase captures a resource YAML and any corresponding validation error.
Click to show internal directories.
Click to hide internal directories.