- switch reflect.DeepEqual to cmp.Diff for better readability
- some cmp.Diff arguments were reversed(!)
- coverted one test into a table test
- cleaned up some misleading error messages
- preferred testing.Error to testing.Fatal to enable collecting more errors at once
* making language as required flag
* create tests fixed
* gofmt
* more tests fixed
* more tests added for invalid runtime and template
* changes removed from client library
Co-authored-by: Luke Kingland <58986931+lkingland@users.noreply.github.com>
* src: directly serialize Function metadata as func.yaml
Functions now save directly to func.yaml using .Write().
Fixes a serialization error where defaults were not respected on load.
Moves runtime and template defaults into function constructor.
Extracts Function validation (was config validation) into separate functions.
Extracts associated test files (validation) into separate unit test files.
Updates schema generator to use Function
* comment spelling and re-enabling tests
* chore: test helpers relocation
The knative automations run test with all tags set simultaneously. This
causes collisions when using tags to separate sets. This commit moves
all helper functions in the function_test package into a file with no
build tags such that any combination of tags will work.
* src: move test helpers into their own package
* src: spelling and language tweaks