]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/clean/server/test.sh
Migrate to bull
[github/Chocobozzz/PeerTube.git] / scripts / clean / server / test.sh
index 927671dd415cb5ca5c0e6575457766915a6218be..753b8c67eb32724633868679f26c58b612eed0a8 100755 (executable)
@@ -1,6 +1,12 @@
-#!/usr/bin/env sh
+#!/bin/sh
+
+set -eu
 
 for i in $(seq 1 6); do
-  printf "use peertube-test%s;\ndb.dropDatabase();" "$i" | mongo
+  dropdb "peertube_test$i"
   rm -rf "./test$i"
+  rm -f "./config/local-test.json"
+  rm -f "./config/local-test-$i.json"
+  createdb -O peertube "peertube_test$i"
+  redis-cli KEYS "bull-localhost:900$i*" | grep -v empty | xargs --no-run-if-empty redis-cli DEL
 done