Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Use runtime go1.14 in integration tests #1140

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ get-nodejs-multi-verify:
kubeless function call get-nodejs-multi |egrep hello.world

get-go:
kubeless function deploy get-go --runtime go1.10 --handler handler.Foo --from-file golang/helloget.go
kubeless function deploy get-go --runtime go1.14 --handler handler.Foo --from-file golang/helloget.go

get-go-verify:
kubeless function call get-go |egrep Hello.world

get-go-custom-port:
kubeless function deploy get-go-custom-port --runtime go1.10 --handler helloget.Foo --from-file golang/helloget.go --port 8083
kubeless function deploy get-go-custom-port --runtime go1.14 --handler helloget.Foo --from-file golang/helloget.go --port 8083

get-go-custom-port-verify:
kubectl get svc get-go-custom-port -o yaml | grep 'targetPort: 8083'
Expand All @@ -151,22 +151,22 @@ get-go-custom-port-verify:
timeout-go:
$(eval TMPDIR := $(shell mktemp -d))
printf 'package kubeless\nimport "github.com/kubeless/kubeless/pkg/functions"\nfunc Foo(event functions.Event, context functions.Context) (string, error) {\nfor{\n}\nreturn "", nil\n}' > $(TMPDIR)/hello-loop.js
kubeless function deploy timeout-go --runtime go1.10 --handler helloget.Foo --from-file $(TMPDIR)/hello-loop.js --timeout 4
kubeless function deploy timeout-go --runtime go1.14 --handler helloget.Foo --from-file $(TMPDIR)/hello-loop.js --timeout 4
rm -rf $(TMPDIR)

timeout-go-verify:
$(eval MSG := $(shell kubeless function call timeout-go 2>&1 || true))
echo $(MSG) | egrep Request.timeout.exceeded

get-go-deps:
kubeless function deploy get-go-deps --runtime go1.10 --handler helloget.Hello --from-file golang/hellowithdeps.go --dependencies golang/Gopkg.toml
kubeless function deploy get-go-deps --runtime go1.14 --handler helloget.Hello --from-file golang/hellowithdeps.go --dependencies golang/Gopkg.toml

get-go-deps-verify:
kubeless function call get-go-deps --data '{"hello": "world"}'
kubectl logs --tail=1000 -l function=get-go-deps | grep -q 'level=info msg=.*hello.*world'

post-go:
kubeless function deploy post-go --runtime go1.10 --handler hellowithdata.Handler --from-file golang/hellowithdata.go
kubeless function deploy post-go --runtime go1.14 --handler hellowithdata.Handler --from-file golang/hellowithdata.go

post-go-verify:
kubeless function call post-go --data '{"it-s": "alive"}'| egrep "it.*alive"
Expand Down Expand Up @@ -761,7 +761,7 @@ pubsub-ruby-verify:

pubsub-go:
kubeless topic create s3-go || true
kubeless function deploy pubsub-go --runtime go1.10 --handler pubsub-go.Handler --from-file golang/hellowithdata.go
kubeless function deploy pubsub-go --runtime go1.14 --handler pubsub-go.Handler --from-file golang/hellowithdata.go
kubeless trigger kafka create pubsub-go --function-selector created-by=kubeless,function=pubsub-go --trigger-topic s3-go

pubsub-go-verify:
Expand Down