freechat/json-api/run-api-tests.sh
shockrah 52676cdd1f - Removing /messages/from_id as its no longer usable with the new id generation model
+ Adding new flags to sample .env file
+ Wrapper script run-api-tests.sh which does as its called
- Removing build.sh in favor of run-api-tests.sh
Makefile takes care of building, and apitests are ran with special script anyway
2021-04-20 12:09:05 -07:00

25 lines
450 B
Bash

#!/bin/bash
# First the rtc server
pushd ../rtc-server/
node main.js&
rtc_pid=$!
popd
# Next the json api
cargo run --release -- -s&
json_pid=$!
sleep 2
# Next come back and startup the rest test client
source ./client-tests/bin/activate
python3 client-tests/client.py
catch errors that may occur and kill off process group
trap "kill $json_pid $rtc_pid" exit INT TERM
# Normal exit (for the most part)
kill -9 $json_pid $rtc_pid
echo Done