From: Chocobozzz Date: Tue, 3 Apr 2018 06:49:18 +0000 (+0200) Subject: Add information about test databases in contributing guide X-Git-Tag: v1.0.0-beta.4~98 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=a2897212640d6ff09881aaf1cc49bbdf65b4918d;hp=1909685158e092df617e50add9e6e655b5d23cbf;p=github%2FChocobozzz%2FPeerTube.git Add information about test databases in contributing guide --- diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a58efc1dd..74dad7381 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -105,11 +105,22 @@ $ npm run dev ### Federation -This will run 3 nodes: +Create the tests database if they do not exist: + +``` +$ sudo -u postgres createdb -O peertube peertube_test{1,2,3} +``` + +Build the application and flush the old tests data: ``` $ npm run build $ npm run clean:server:test +``` + +This will run 3 nodes: + +``` $ npm run play ``` @@ -119,7 +130,13 @@ with the `root` as username and `test{1,2,3}` for the password. ### Unit tests -To run unit tests, you need to build the application first: +Create the tests database if they do not exist: + +``` +$ sudo -u postgres createdb -O peertube peertube_test{1,2,3} +``` + +Build the application and run the unit/integration tests: ``` $ npm run build