Commit Graph

2 Commits

Author SHA1 Message Date
Evan Anderson a7f0374c04
Clean up tests: (#679)
- 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
2021-11-28 21:29:03 -08:00
Luke Kingland c2e1b769cc
src: direct serialization of Function metadata as func.yaml (#641)
* 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
2021-11-17 06:18:35 -08:00