Documentation ¶
Overview ¶
Package v1alphatest provides test utilities specifically for v1alpha manifest validation. Since we want to test the validation of whole manifest.Object and not it's individual fields, duplicating logic for objects like v1alpha.Labels can be cumbersome and hard to maintain. This package solves the issue by defining a single source of truth for test cases for objects like v1alpha.Labels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLabelsTestCases ¶
Types ¶
type LabelsTestCase ¶
type LabelsTestCase[T manifest.Object] struct { Labels v1alpha.Labels // contains filtered or unexported fields }
func (LabelsTestCase[T]) Test ¶
func (tc LabelsTestCase[T]) Test(t *testing.T, object T, validate func(T) *v1alpha.ObjectError)
type MetadataAnnotationsTestCase ¶
type MetadataAnnotationsTestCase[T manifest.Object] struct { Annotations v1alpha.MetadataAnnotations // contains filtered or unexported fields }
func (MetadataAnnotationsTestCase[T]) Test ¶
func (tc MetadataAnnotationsTestCase[T]) Test(t *testing.T, object T, validate func(T) *v1alpha.ObjectError)
Click to show internal directories.
Click to hide internal directories.