summaryrefslogtreecommitdiffstats
path: root/docs/src/contributing_tests.md
diff options
context:
space:
mode:
authorFelix Ableitner <me@nutomic.com>2020-06-27 15:28:45 +0200
committerFelix Ableitner <me@nutomic.com>2020-06-27 15:28:45 +0200
commitafe3b6b2fcaf08a84f92bfdff9228e54132e2de7 (patch)
tree5dbd283717fd8896fcba62387def40a919742065 /docs/src/contributing_tests.md
parent96f133750dd295d62672beec38232f81764cade8 (diff)
Add docs for testing (fixes #841)
Diffstat (limited to 'docs/src/contributing_tests.md')
-rw-r--r--docs/src/contributing_tests.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/src/contributing_tests.md b/docs/src/contributing_tests.md
new file mode 100644
index 00000000..13e5d122
--- /dev/null
+++ b/docs/src/contributing_tests.md
@@ -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`