From ca6bc12cfc3c94c9a5d07ff82ff9a674cdb22ee2 Mon Sep 17 00:00:00 2001 From: Vishal Date: Sun, 9 May 2021 23:36:39 +0530 Subject: [PATCH] Restoring one example as it is used in many places including Helm charts (#2011) Some tests were pointing to examples directory which has been moved out. Also kept one node.js examples as it is widely used in Helm charts etc. --- examples/nodejs/hello.js | 7 +++++++ test/tests/test_kubectl/spec-yaml/function-go.yaml | 2 +- test/tests/test_package_checksum.sh | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 examples/nodejs/hello.js diff --git a/examples/nodejs/hello.js b/examples/nodejs/hello.js new file mode 100644 index 00000000..aa94dc47 --- /dev/null +++ b/examples/nodejs/hello.js @@ -0,0 +1,7 @@ + +module.exports = async function(context) { + return { + status: 200, + body: "hello, world!\n" + }; +} diff --git a/test/tests/test_kubectl/spec-yaml/function-go.yaml b/test/tests/test_kubectl/spec-yaml/function-go.yaml index edc1ead7..fbaa16c2 100644 --- a/test/tests/test_kubectl/spec-yaml/function-go.yaml +++ b/test/tests/test_kubectl/spec-yaml/function-go.yaml @@ -15,7 +15,7 @@ spec: sum: aa595bb952047c517d849f8fc9e490fdabc37d83795392074a0b15a59748004f type: sha256 type: url - url: https://raw.githubusercontent.com/fission/fission/master/examples/go/hello.gogo # this is intentional + url: https://raw.githubusercontent.com/fission/examples/master/go/hello.gogo # this is intentional --- apiVersion: fission.io/v1 diff --git a/test/tests/test_package_checksum.sh b/test/tests/test_package_checksum.sh index cbfbac33..48f3eb9d 100755 --- a/test/tests/test_package_checksum.sh +++ b/test/tests/test_package_checksum.sh @@ -38,8 +38,8 @@ fi log "Download test script" -url1="https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello.js" -url2="https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello-callback.js" +url1="https://raw.githubusercontent.com/fission/examples/master/nodejs/hello.js" +url2="https://raw.githubusercontent.com/fission/examples/master/nodejs/hello-callback.js" wget ${url1} sum=$(shasum -a 256 hello.js|cut -d' ' -f 1)