Files
fission-src/test/tests/websocket/test_ws.sh
T
Shubham BansalandGitHub 904413db6d Capture previous command exit code in integration tests cleanup (#2503)
* show previous response code

* log previous response code of shell script command
2022-08-04 10:16:05 +05:30

29 lines
527 B
Bash
Executable File

#!/bin/bash
#
# Create a function and trigger it using NATS
#
set -euo pipefail
source $(dirname $0)/../../utils.sh
cleanup() {
echo "previous response" $?
log "Deleting websocket setup"
fission spec destroy
}
DIR=$(dirname $0)
if [ -z "${TEST_NOCLEANUP:-}" ]; then
trap cleanup EXIT
else
log "TEST_NOCLEANUP is set; not cleaning up test artifacts afterwards."
fi
log "Creating websocket setup.."
fission spec apply --specdir=$DIR/specs
log "Testing websocket connection"
cd $DIR && go run main.go