aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/clean
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/clean')
-rwxr-xr-xscripts/clean/server/test.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/clean/server/test.sh b/scripts/clean/server/test.sh
index 20745170d..dbd399aaa 100755
--- a/scripts/clean/server/test.sh
+++ b/scripts/clean/server/test.sh
@@ -5,7 +5,7 @@ set -eu
5recreateDB () { 5recreateDB () {
6 dbname="peertube_test$1" 6 dbname="peertube_test$1"
7 7
8 dropdb --if-exists "$dbname" 8 dropdb --if-exists "$dbname" 2>&1
9 9
10 createdb -O peertube "$dbname" 10 createdb -O peertube "$dbname"
11 psql -c "CREATE EXTENSION pg_trgm;" "$dbname" & 11 psql -c "CREATE EXTENSION pg_trgm;" "$dbname" &
@@ -18,10 +18,15 @@ removeFiles () {
18 18
19dropRedis () { 19dropRedis () {
20 port=$((9000+$1)) 20 port=$((9000+$1))
21 host="localhost"
21 22
22 redis-cli KEYS "bull-localhost:$port*" | grep -v empty | xargs --no-run-if-empty redis-cli DEL 23 if [ ! -z ${GITLAB_CI+x} ]; then
23 redis-cli KEYS "redis-localhost:$port*" | grep -v empty | xargs --no-run-if-empty redis-cli DEL 24 host="redis"
24 redis-cli KEYS "*redis-localhost:$port-" | grep -v empty | xargs --no-run-if-empty redis-cli DEL 25 fi
26
27 redis-cli -h "$host" KEYS "bull-localhost:$port*" | grep -v empty | xargs --no-run-if-empty redis-cli -h "$host" DEL
28 redis-cli -h "$host" KEYS "redis-localhost:$port*" | grep -v empty | xargs --no-run-if-empty redis-cli -h "$host" DEL
29 redis-cli -h "$host" KEYS "*redis-localhost:$port-" | grep -v empty | xargs --no-run-if-empty redis-cli -h "$host" DEL
25} 30}
26 31
27seq=$(seq 1 6) 32seq=$(seq 1 6)