diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/clean_test.sh | 4 | ||||
-rwxr-xr-x | scripts/run_servers.sh | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scripts/clean_test.sh b/scripts/clean_test.sh index e46b5ecd5..ef146e091 100755 --- a/scripts/clean_test.sh +++ b/scripts/clean_test.sh | |||
@@ -1,6 +1,8 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | basePath=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
4 | |||
3 | for i in $(seq 1 6); do | 5 | for i in $(seq 1 6); do |
4 | printf "use peertube-test%s;\ndb.dropDatabase();" "$i" | mongo | 6 | printf "use peertube-test%s;\ndb.dropDatabase();" "$i" | mongo |
5 | rm -rf "./test$i" | 7 | rm -rf "$basePath/../test$i" |
6 | done | 8 | done |
diff --git a/scripts/run_servers.sh b/scripts/run_servers.sh index f99ca6bd9..83768178c 100755 --- a/scripts/run_servers.sh +++ b/scripts/run_servers.sh | |||
@@ -1,5 +1,10 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | if [ ! -f server.js ]; then | ||
4 | echo "The script has to be executed at the root of the project." | ||
5 | exit -1 | ||
6 | fi | ||
7 | |||
3 | NODE_ENV=test NODE_APP_INSTANCE=1 node server.js & | 8 | NODE_ENV=test NODE_APP_INSTANCE=1 node server.js & |
4 | sleep 1 | 9 | sleep 1 |
5 | NODE_ENV=test NODE_APP_INSTANCE=2 node server.js & | 10 | NODE_ENV=test NODE_APP_INSTANCE=2 node server.js & |