Skip to content

Commit

Permalink
chore: Add the cloudevents client to the testing suite.
Browse files Browse the repository at this point in the history
The cloudevents sdk is a major part of the faas-js-runtime and is responsible for converting the requests events into CloudEvents.
  • Loading branch information
lholmquist committed Mar 29, 2023
1 parent 926eb1c commit c15adea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ test_client_prom
test_client_opossum
test_client_kube
test_client_faas
test_client_cloudevents
"

readonly EXPRESS_REVISION="${EXPRESS_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show express version)}"
Expand All @@ -89,6 +90,8 @@ readonly KUBESERVICEBINDINGS_REVISION="v${KUBESERVICEBINDINGS_REVISION:-$(docker
readonly KUBESERVICEBINDINGS_REPO="https://github.com/nodeshift/kube-service-bindings.git"
readonly FAASJSRUNTIME_REVISION="v${FAASJSRUNTIME_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show faas-js-runtime version)}"
readonly FAASJSRUNTIME_REPO="https://github.com/nodeshift/faas-js-runtime.git"
readonly CLOUDEVENTS_REVISION="v${CLOUDEVENTS_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show cloudevents version)}"
readonly CLOUDEVENTS_REPO="https://github.com/cloudevents/sdk-javascript.git"

source "${THISDIR}/test-lib.sh"
source "${THISDIR}/test-lib-nodejs.sh"
Expand Down
5 changes: 5 additions & 0 deletions test/test-lib-nodejs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ function test_client_faas() {
test_running_client_js faas-js-runtime
}

function test_client_cloudevents() {
echo "Running CloudEvents client test"
test_running_client_js cloudevents
}

function test_check_build_using_dockerfile() {
info "Check building using a Dockerfile"
ct_test_app_dockerfile ${THISDIR}/examples/from-dockerfile/Dockerfile 'https://github.com/sclorg/nodejs-ex.git' 'Welcome to your Node.js application on OpenShift' app-src
Expand Down

0 comments on commit c15adea

Please sign in to comment.