+ Adding back the test script so its ready for ci
This commit is contained in:
parent
34426038d9
commit
e0d5b8b5f7
30
scripts/run-api-tests.sh
Normal file
30
scripts/run-api-tests.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# First the rtc server
|
||||
pushd ../rtc-server/
|
||||
echo Setting up RTC server
|
||||
npm run autotest&
|
||||
rtc_pid=$!
|
||||
popd
|
||||
|
||||
# Next the json api
|
||||
pushd ../json-api/
|
||||
echo Setting up API server
|
||||
cargo run --release -- -H ../hmac.secret -w ../wss-hmac.secret -s&
|
||||
json_pid=$!
|
||||
sleep 2
|
||||
|
||||
# Next come back and startup the rest test client
|
||||
echo Setting up the client itself
|
||||
source ./client-tests/bin/activate
|
||||
# Put this in the background in case it errors out
|
||||
python3 client-tests/main.py
|
||||
popd
|
||||
|
||||
|
||||
# catch errors that may occur and kill off process group
|
||||
kill $(pgrep node)
|
||||
kill $(pgrep json)
|
||||
#trap 'kill $(jobs -p)' EXIT
|
||||
|
||||
echo Done
|
Loading…
Reference in New Issue
Block a user