Documentation ¶
Index ¶
- func AssertGeneratePatches[T mutation.GeneratePatches](t GinkgoTInterface, handlerCreator func() T, tt *PatchTestDef)
- func ValidateDiscoverVariables[T mutation.DiscoverVariables](t *testing.T, variableName string, variableSchema *clusterv1.VariableSchema, ...)
- func VariableWithValue(variableName string, value any, variablePath ...string) runtimehooksv1.Variable
- type JSONPatchMatcher
- type PatchTestDef
- type VariableTestDef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertGeneratePatches ¶
func AssertGeneratePatches[T mutation.GeneratePatches]( t GinkgoTInterface, handlerCreator func() T, tt *PatchTestDef, )
func ValidateDiscoverVariables ¶
func ValidateDiscoverVariables[T mutation.DiscoverVariables]( t *testing.T, variableName string, variableSchema *clusterv1.VariableSchema, variableRequired bool, handlerCreator func() T, variableTestDefs ...VariableTestDef, )
func VariableWithValue ¶
func VariableWithValue( variableName string, value any, variablePath ...string, ) runtimehooksv1.Variable
VariableWithValue returns a runtimehooksv1.Variable with the passed name and value.
Types ¶
type JSONPatchMatcher ¶
type JSONPatchMatcher struct { Operation string Path string ValueMatcher gomegatypes.GomegaMatcher }
type PatchTestDef ¶
type PatchTestDef struct { Name string Vars []runtimehooksv1.Variable RequestItem runtimehooksv1.GeneratePatchesRequestItem ExpectedPatchMatchers []JSONPatchMatcher // UnexpectedPatchMatchers used to test patches that should not be present UnexpectedPatchMatchers []JSONPatchMatcher ExpectedFailure bool }
type VariableTestDef ¶
Click to show internal directories.
Click to hide internal directories.