openvidu-recording-java: e2e test script improved
This commit is contained in:
parent
1b911e4a99
commit
23c8e9d3d5
@ -13,6 +13,27 @@
|
||||
|
||||
CURRENT_PATH=$PWD
|
||||
|
||||
|
||||
### Check for write permissions in current path with current user
|
||||
if [ ! -w $CURRENT_PATH ]; then
|
||||
echo "User does not have write permissions in this path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
### Check that no openvidu-server or openvidu-recording-java are already running
|
||||
if nc -z localhost 4443; then
|
||||
echo "ERROR launching openvidu-server. Port 4443 is already occupied"
|
||||
echo "You may kill all openvidu processes before running the script with this command: $ sudo kill -9 \$(ps aux | grep openvidu-recording-java | awk '{print \$2}')"
|
||||
exit 1
|
||||
fi
|
||||
if nc -z localhost 5000; then
|
||||
echo "ERROR launching openvidu-recording-java. Port 5000 is already occupied"
|
||||
echo "You may kill all openvidu processes before running the script with this command: $ sudo kill -9 \$(ps aux | grep openvidu-recording-java | awk '{print \$2}')"
|
||||
fi
|
||||
|
||||
|
||||
### Delete repo folders if they exist
|
||||
rm -rf openvidu
|
||||
rm -rf openvidu-tutorials
|
||||
|
||||
@ -26,28 +47,19 @@ git clone https://github.com/OpenVidu/openvidu-tutorials.git || exit 1
|
||||
git clone https://github.com/OpenVidu/openvidu.git || exit 1
|
||||
|
||||
|
||||
### Launch openvidu-server
|
||||
### Launch openvidu-server in the background
|
||||
cd $CURRENT_PATH/openvidu
|
||||
mvn -DskipTests=true clean -DskipTests=true compile -DskipTests=true install || exit 1
|
||||
cd $CURRENT_PATH/openvidu/openvidu-server
|
||||
|
||||
if nc -z localhost 4443; then
|
||||
echo "ERROR launching openvidu-server. Port 4443 is already occupied. Kill all processes listed by 'ps -ef | grep openvidu'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mvn package -Dopenvidu.recording=true -Dopenvidu.recording.path=$CURRENT_PATH/recordings exec:java &> $CURRENT_PATH/openvidu-server.log &
|
||||
|
||||
|
||||
### Launch openvidu-recording-java app
|
||||
### Launch openvidu-recording-java app in the background
|
||||
cd $CURRENT_PATH/openvidu-tutorials/openvidu-recording-java
|
||||
|
||||
if nc -z localhost 5000; then
|
||||
echo "ERROR launching openvidu-recording-java. Port 5000 is already occupied. Kill all processes listed by 'ps -ef | grep openvidu'"
|
||||
fi
|
||||
|
||||
mvn package -DskipTests=true exec:java &> $CURRENT_PATH/openvidu-recording-java.log &
|
||||
|
||||
|
||||
### Wait for both processes
|
||||
echo "Waiting openvidu-recording-java app to launch on 5000"
|
||||
while ! nc -z localhost 5000; do
|
||||
sleep 1
|
||||
@ -63,5 +75,5 @@ done
|
||||
echo "openvidu-server ready"
|
||||
|
||||
|
||||
### Launch e2e test
|
||||
### Launch e2e test in the foreground
|
||||
mvn -Dtest=AppTestE2e -DAPP_URL=https://localhost:5000/ -DOPENVIDU_URL=https://localhost:4443/ -DOPENVIDU_SECRET=MY_SECRET -DNUMBER_OF_ATTEMPTS=30 -DRECORDING_DURATION=5 -DDURATION_THRESHOLD=5 -DRECORDING_PATH=$CURRENT_PATH/recordings test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user