Files
fission-src/test/tests/websocket/test_ws.sh
T
Harsh ThakurandGitHub f01de5c802 Add websocket test (#2053)
* Add websocket test

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use trap for exit code

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Remove readme

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Format, go version fix

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Update image name

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use spec dir

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Change directory before running file

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>

* Use

Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
2021-06-10 12:27:20 +05:30

28 lines
495 B
Bash
Executable File

#!/bin/bash
#
# Create a function and trigger it using NATS
#
set -euo pipefail
source $(dirname $0)/../../utils.sh
cleanup() {
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