aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/CONTRIBUTING.md12
-rwxr-xr-xscripts/clean/server/test.sh2
2 files changed, 9 insertions, 5 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 74dad7381..5a484fbbd 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -105,10 +105,12 @@ $ npm run dev
105 105
106### Federation 106### Federation
107 107
108Create the tests database if they do not exist: 108Create a PostgreSQL user **with the same name as your username** in order to avoid using the *postgres* user.
109Then, we can create the databases (if they don't already exist):
109 110
110``` 111```
111$ sudo -u postgres createdb -O peertube peertube_test{1,2,3} 112$ sudo -u postgres createuser you_username --createdb
113$ createdb -O peertube peertube_test{1,2,3}
112``` 114```
113 115
114Build the application and flush the old tests data: 116Build the application and flush the old tests data:
@@ -130,10 +132,12 @@ with the `root` as username and `test{1,2,3}` for the password.
130 132
131### Unit tests 133### Unit tests
132 134
133Create the tests database if they do not exist: 135Create a PostgreSQL user **with the same name as your username** in order to avoid using the *postgres* user.
136Then, we can create the databases (if they don't already exist):
134 137
135``` 138```
136$ sudo -u postgres createdb -O peertube peertube_test{1,2,3} 139$ sudo -u postgres createuser you_username --createdb
140$ createdb -O peertube peertube_test{1,2,3}
137``` 141```
138 142
139Build the application and run the unit/integration tests: 143Build the application and run the unit/integration tests:
diff --git a/scripts/clean/server/test.sh b/scripts/clean/server/test.sh
index 7d353e375..303806fe2 100755
--- a/scripts/clean/server/test.sh
+++ b/scripts/clean/server/test.sh
@@ -7,6 +7,6 @@ for i in $(seq 1 6); do
7 rm -rf "./test$i" 7 rm -rf "./test$i"
8 rm -f "./config/local-test.json" 8 rm -f "./config/local-test.json"
9 rm -f "./config/local-test-$i.json" 9 rm -f "./config/local-test-$i.json"
10 createdb "peertube_test$i" 10 createdb -O peertube "peertube_test$i"
11 redis-cli KEYS "q-localhost:900$i*" | grep -v empty | xargs --no-run-if-empty redis-cli DEL 11 redis-cli KEYS "q-localhost:900$i*" | grep -v empty | xargs --no-run-if-empty redis-cli DEL
12done 12done