diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-29 11:59:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-07-29 13:40:39 +0200 |
commit | 2284f202070aa2e49156cc52b3b1596a7d5aadec (patch) | |
tree | 77aeb00016734667f8ff32a98ea8b4a6ed3ca31e /scripts/clean/server | |
parent | 112be80ebdf96ef6a27420c1c6a10097388731a9 (diff) | |
download | PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.gz PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.zst PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.zip |
Add gitlab ci support
Diffstat (limited to 'scripts/clean/server')
-rwxr-xr-x | scripts/clean/server/test.sh | 13 |
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 | |||
5 | recreateDB () { | 5 | recreateDB () { |
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 | ||
19 | dropRedis () { | 19 | dropRedis () { |
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 | ||
27 | seq=$(seq 1 6) | 32 | seq=$(seq 1 6) |