diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/clean_test.sh | 8 | ||||
-rwxr-xr-x | bin/run_servers.sh | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/bin/clean_test.sh b/bin/clean_test.sh new file mode 100755 index 000000000..ef146e091 --- /dev/null +++ b/bin/clean_test.sh | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | basePath=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
4 | |||
5 | for i in $(seq 1 6); do | ||
6 | printf "use peertube-test%s;\ndb.dropDatabase();" "$i" | mongo | ||
7 | rm -rf "$basePath/../test$i" | ||
8 | done | ||
diff --git a/bin/run_servers.sh b/bin/run_servers.sh new file mode 100755 index 000000000..83768178c --- /dev/null +++ b/bin/run_servers.sh | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/bash | ||
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 | |||
8 | NODE_ENV=test NODE_APP_INSTANCE=1 node server.js & | ||
9 | sleep 1 | ||
10 | NODE_ENV=test NODE_APP_INSTANCE=2 node server.js & | ||
11 | sleep 1 | ||
12 | NODE_ENV=test NODE_APP_INSTANCE=3 node server.js & | ||