diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-11 00:21:00 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-11 00:21:00 +0200 |
commit | 78a1c174688d51040d76fce0b9bc7693ec985a97 (patch) | |
tree | e1e9dfe35d35eee58db5f47c529697de794e47fc /tests/README.markdown | |
parent | 6e170393e6a044d9d6981a15d94b7cdada97aac4 (diff) | |
download | mastodon.py-78a1c174688d51040d76fce0b9bc7693ec985a97.tar.gz |
Fix tests
Diffstat (limited to 'tests/README.markdown')
-rw-r--r-- | tests/README.markdown | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/README.markdown b/tests/README.markdown index e4ad200..8f7d638 100644 --- a/tests/README.markdown +++ b/tests/README.markdown | |||
@@ -28,7 +28,16 @@ To set this up, follow the development guide and set up the database using "rail | |||
28 | 28 | ||
29 | It also needs various things to be set up for it. The following command should do the trick: | 29 | It also needs various things to be set up for it. The following command should do the trick: |
30 | 30 | ||
31 | sudo redis-cli flushall && sleep 3 && sudo /etc/init.d/redis-server restart && RAILS_ENV=development rails db:setup && RAILS_ENV=development bin/tootctl accounts create admin2 --email [email protected] --confirmed --role Owner && psql -d mastodon_development < ~/masto/Mastodon.py/tests/setup.sql && sleep 4 && foreman start | 31 | sudo redis-cli flushall && sleep 3 && \ |
32 | sudo /etc/init.d/redis-server restart && \ | ||
33 | RAILS_ENV=development rails db:setup && \ | ||
34 | RAILS_ENV=development bin/tootctl accounts create admin2 --email [email protected] --confirmed --role Owner && \ | ||
35 | RAILS_ENV=development bin/tootctl accounts create mastodonpy_test --email mastodonpy_test@localhost:3000 --confirmed && \ | ||
36 | RAILS_ENV=development bin/tootctl accounts create mastodonpy_test_2 --email mastodonpy_test_2@localhost:3000 --confirmed && \ | ||
37 | sql -d mastodon_development < ~/masto/Mastodon.py/tests/setup.sql && sleep 4 && \ | ||
38 | RAILS_ENV=development DB_PASS="" foreman start | ||
39 | |||
40 | You _may_ additionally have to set up a database password and pass it as DB_PASS for the streaming tests to function. | ||
32 | 41 | ||
33 | Tests that send requests to Mastodon should be marked as needing VCR with the `pytest.mark.vcr` decorator. | 42 | Tests that send requests to Mastodon should be marked as needing VCR with the `pytest.mark.vcr` decorator. |
34 | 43 | ||