Add checks to the scripts (they has to be executed at the root of the
project)
This commit is contained in:
parent
2dd5b570a6
commit
ecef65b605
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
basePath=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
|
|
||||||
for i in $(seq 1 6); do
|
for i in $(seq 1 6); do
|
||||||
printf "use peertube-test%s;\ndb.dropDatabase();" "$i" | mongo
|
printf "use peertube-test%s;\ndb.dropDatabase();" "$i" | mongo
|
||||||
rm -rf "./test$i"
|
rm -rf "$basePath/../test$i"
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -f server.js ]; then
|
||||||
|
echo "The script has to be executed at the root of the project."
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
NODE_ENV=test NODE_APP_INSTANCE=1 node server.js &
|
NODE_ENV=test NODE_APP_INSTANCE=1 node server.js &
|
||||||
sleep 1
|
sleep 1
|
||||||
NODE_ENV=test NODE_APP_INSTANCE=2 node server.js &
|
NODE_ENV=test NODE_APP_INSTANCE=2 node server.js &
|
||||||
|
|
Loading…
Reference in New Issue