Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Document how to see logger output when running the twisted tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Jun 9, 2021
1 parent c7f3fb2 commit 37ec1ba
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
36 changes: 24 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,18 +293,6 @@ try installing the failing modules individually::

pip install -e "module-name"

Once this is done, you may wish to run Synapse's unit tests to
check that everything is installed correctly::

python -m twisted.trial tests

This should end with a 'PASSED' result (note that exact numbers will
differ)::

Ran 1337 tests in 716.064s

PASSED (skips=15, successes=1322)

We recommend using the demo which starts 3 federated instances running on ports `8080` - `8082`

./demo/start.sh
Expand All @@ -324,6 +312,30 @@ If you just want to start a single instance of the app and run it directly::
python -m synapse.app.homeserver --config-path homeserver.yaml


Running the unit tests
======================

After getting up and running, you may wish to run Synapse's unit tests to
check that everything is installed correctly::

python -m twisted.trial tests

This should end with a 'PASSED' result (note that exact numbers will
differ)::

Ran 1337 tests in 716.064s

PASSED (skips=15, successes=1322)

To run a specific test::

python -m twisted.trial tests.storage.test_redaction
python -m twisted.trial tests.handlers.test_presence.PresenceJoinTestCase.test_remote_gets_presence_when_local_user_joins

To see logger output from the app while the tests run, set ``SYNAPSE_TEST_LOG_LEVEL``
and the resulting logs will be in ``_trial_temp/test.log``::

SYNAPSE_TEST_LOG_LEVEL=DEBUG python -m twisted.trial tests


Running the Integration Tests
Expand Down
1 change: 1 addition & 0 deletions changelog.d/10148.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document `SYNAPSE_TEST_LOG_LEVEL` to see the logger output when running tests.

0 comments on commit 37ec1ba

Please sign in to comment.