]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - scripts/clean/server/test.sh
5f9a88a2ec3fe97df21b8aaab3da070f5cca2571
[github/Chocobozzz/PeerTube.git] / scripts / clean / server / test.sh
1 #!/bin/sh
2
3 set -eu
4
5 for i in $(seq 1 6); do
6 dbname="peertube_test$i"
7
8 dropdb --if-exists "$dbname"
9 rm -rf "./test$i" "./config/local-test.json" "./config/local-test-$i.json"
10
11 createdb -O peertube "$dbname"
12 psql -c "CREATE EXTENSION pg_trgm;" "$dbname"
13 psql -c "CREATE EXTENSION unaccent;" "$dbname"
14 redis-cli KEYS "bull-localhost:900$i*" | grep -v empty | xargs --no-run-if-empty redis-cli DEL
15 done