Versions in this module Expand all Collapse all v0 v0.2.1 Feb 15, 2024 v0.2.0 Feb 14, 2024 Changes in this version + const AnnotationKeyResourceName + type FunctionTest struct + func TestFunction(t *testing.T, fn server.ServerFunction, opts ...TestFunctionOpt) *FunctionTest + func (t *FunctionTest) Run(ctx context.Context) + type ResourceModifier func(res *fnapi.Resource) + func WithConnectionDetails(cd map[string][]byte) ResourceModifier + func WithReady(ready fnapi.Ready) ResourceModifier + type TestFunctionOpt func(tc *FunctionTest) + func ExpectDesiredCompositeJSON(rawJSON []byte, mods ...ResourceModifier) TestFunctionOpt + func ExpectDesiredCompositeObject(o runtime.Object, mods ...ResourceModifier) TestFunctionOpt + func ExpectDesiredCompositeYAML(rawYAML []byte, mods ...ResourceModifier) TestFunctionOpt + func ExpectDesiredResourceJSON(name string, rawJSON []byte, mods ...ResourceModifier) TestFunctionOpt + func ExpectDesiredResourceObject(name string, o runtime.Object, mods ...ResourceModifier) TestFunctionOpt + func ExpectDesiredResourceYAML(name string, rawYAML []byte, mods ...ResourceModifier) TestFunctionOpt + func ExpectDesiredResourcesYAML(rawYAML []byte) TestFunctionOpt + func ExpectError(err error) TestFunctionOpt + func ExpectResults(results []*fnapi.Result) TestFunctionOpt + func WithContextValue(key string, value any) TestFunctionOpt + func WithContextValueJSON(key string, rawJSON []byte) TestFunctionOpt + func WithContextValueYAML(key string, rawYAML []byte) TestFunctionOpt + func WithEnvironmentFromConfigsYAML(rawYAML []byte) TestFunctionOpt + func WithInput(input any) TestFunctionOpt + func WithInputJSON(inputJson []byte) TestFunctionOpt + func WithInputYAML(inputYaml []byte) TestFunctionOpt + func WithObservedCompositeJSON(rawJSON []byte) TestFunctionOpt + func WithObservedCompositeObject(o runtime.Object) TestFunctionOpt + func WithObservedCompositeYAML(rawYAML []byte) TestFunctionOpt + func WithObservedResourceJSON(name string, rawJSON []byte) TestFunctionOpt + func WithObservedResourceObject(name string, o runtime.Object) TestFunctionOpt + func WithObservedResourceYAML(name string, rawYAML []byte) TestFunctionOpt + func WithObservedResourcesYAML(rawYAML []byte) TestFunctionOpt