Commit Graph

10 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 ccf00152be
feat: function version migrations (#664)
* feat: function version migrations

* unmarshall functin now part of initialization

* regenerate schema

* spelling errors
2021-11-24 04:50:27 -08:00
Shashank Sharma a0bfc3e3ef
making language runtime a required flag (#647)
* 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>
2021-11-23 18:43:27 -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
Luke Kingland e1fa1ad3c7
chore: test helpers relocation (#653)
* 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
2021-11-12 05:39:37 -08:00
knative-automation cd45b6c007
Format go code (#589)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-18 10:08:22 +02:00
Zbynek Roubalik a73981abe0
src: add test for DeriveImage (#518)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-09-13 05:34:32 -07:00
Luke Kingland ddf4ab86c4
feat: integration tests target 2021-03-10 19:35:27 +09:00
Zbynek Roubalik a5cbe3061b
src: rename from faas to func (#253)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-01-21 17:10:39 +01:00
Matej Vasek 6a621a5186
fix: image parsing 2020-10-20 19:54:33 +02:00