- Removing rtc parts for th pure api testing
This does mean we're going to have to rebuild for API + RTC testing but its ok because the two are wholey different feature sets anway
This commit is contained in:
parent
4c0888a263
commit
37eeb3877c
@ -1,32 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# First the rtc server
|
set -e
|
||||||
pushd ./rtc-server/
|
export DATABASE_URL=mysql://freechat_dev:password@localhost:3306/freechat
|
||||||
echo Setting up RTC server
|
|
||||||
npm run autotest&
|
|
||||||
rtc_pid=$!
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Next the json api
|
# Next the json api
|
||||||
pushd ./json-api/
|
pushd ./json-api/
|
||||||
echo Setting up API server
|
echo Building API server
|
||||||
cargo run --release -- -H ../hmac.secret -w ../wss-hmac.secret -s&
|
# Building without rtc support
|
||||||
|
cargo build --release
|
||||||
|
# Using the newly built binary directly
|
||||||
|
echo Running API server
|
||||||
|
cargo run --release -- -H ../hmac.secret -s&
|
||||||
json_pid=$!
|
json_pid=$!
|
||||||
sleep 5 # Really high wait time because pipelines be slow as hell sometimes
|
echo Cargo PID: $json_pid
|
||||||
|
time=3
|
||||||
|
echo Waiting $time seconds for cargo to catch up
|
||||||
|
sleep $time
|
||||||
|
|
||||||
# Next come back and startup the rest test client
|
# Next come back and startup the rest test client
|
||||||
echo Setting up the client itself
|
echo Setting up client
|
||||||
source ./client-tests/bin/activate
|
source ./client-tests/bin/activate
|
||||||
# Put this in the background in case it errors out
|
# Put this in the background in case it errors out
|
||||||
|
echo Running client
|
||||||
python3 client-tests/main.py
|
python3 client-tests/main.py
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
# Thse probably won't do anything of value in pipelines but hey they work in local
|
|
||||||
# environments so whatever /shrug
|
|
||||||
# catch errors that may occur and kill off process group
|
|
||||||
kill $(pgrep node)
|
|
||||||
kill $(pgrep json)
|
kill $(pgrep json)
|
||||||
#trap 'kill $(jobs -p)' EXIT
|
|
||||||
|
|
||||||
echo Done
|
|
||||||
|
Loading…
Reference in New Issue
Block a user