Looking at the makefile I saw some verification tasks. In my opinion tests should be an (optional) artifact of a deployed function. Is it possible to add an optional field to the function.yaml to define some value, to send it to a deployed function and what values we would expect to get?
Tests could be called by:
kubeless function test get-python
The field in function.yaml might look like:
[...]
tests:
input:
comparator: expectedResult
More concrete example of a function which prints the passed parameters.
[...]
tests:
echo:
is: echo
echo2:
contains: echo2
In my opinion is and contain should be enough to keep it simple. Its just a quick idea, but combined with the vscode plugin it could be a really neat way to do TDD.
Thanks for the suggestion! Right now this is not in scope for 1.0, but we welcome PRs! If you want to give it a try, let us know, and we can help you with the PR process
FEATURE REQUEST:
Looking at the makefile I saw some verification tasks. In my opinion tests should be an (optional) artifact of a deployed function. Is it possible to add an optional field to the
function.yaml
to define some value, to send it to a deployed function and what values we would expect to get?Tests could be called by:
The field in
function.yaml
might look like:More concrete example of a function which prints the passed parameters.
In my opinion
is
andcontain
should be enough to keep it simple. Its just a quick idea, but combined with the vscode plugin it could be a really neat way to do TDD.