]> Untitled Git - lemmy.git/commitdiff
Add docs for testing (fixes #841)
authorFelix Ableitner <me@nutomic.com>
Sat, 27 Jun 2020 13:28:45 +0000 (15:28 +0200)
committerFelix Ableitner <me@nutomic.com>
Sat, 27 Jun 2020 13:28:45 +0000 (15:28 +0200)
docs/src/SUMMARY.md
docs/src/contributing_tests.md [new file with mode: 0644]

index bff5cbf64f9b07c2fe9d6b69a33554b899f3ce45..a2bf585697c264195e8e8c4e44287ca264babea5 100644 (file)
@@ -14,6 +14,7 @@
 - [Contributing](contributing.md)
   - [Docker Development](contributing_docker_development.md)
   - [Local Development](contributing_local_development.md)
+  - [Tests](contributing_tests.md)
   - [Federation Development](contributing_federation_development.md)
   - [Websocket/HTTP API](contributing_websocket_http_api.md)
   - [ActivityPub API Outline](contributing_apub_api_outline.md)
diff --git a/docs/src/contributing_tests.md b/docs/src/contributing_tests.md
new file mode 100644 (file)
index 0000000..13e5d12
--- /dev/null
@@ -0,0 +1,18 @@
+### Tests
+
+#### Rust
+
+After installing [local development dependencies](contributing_local_development.md), run the
+following commands in the `server` subfolder:
+
+```bash
+psql -U lemmy -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
+export DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
+diesel migration run
+RUST_TEST_THREADS=1 cargo test
+```
+
+### Federation
+
+Install the [Docker development dependencies](contributing_docker_development.md), and execute
+`docker/federation-test/run-tests.sh`