mirror of
https://github.com/element-hq/synapse
synced 2024-08-18 22:40:51 +00:00
deploy: 7c3408d1a8
This commit is contained in:
parent
29178fa294
commit
0bc2fa76b8
4 changed files with 30 additions and 2 deletions
|
@ -292,6 +292,20 @@ trial tests.rest.admin.test_room tests.handlers.test_admin.ExfiltrateData.test_i
|
|||
<p>To increase the log level for the tests, set <code>SYNAPSE_TEST_LOG_LEVEL</code>:</p>
|
||||
<pre><code class="language-sh">SYNAPSE_TEST_LOG_LEVEL=DEBUG trial tests
|
||||
</code></pre>
|
||||
<p>By default, tests will use an in-memory SQLite database for test data. For additional
|
||||
help with debugging, one can use an on-disk SQLite database file instead, in order to
|
||||
review database state during and after running tests. This can be done by setting
|
||||
the <code>SYNAPSE_TEST_PERSIST_SQLITE_DB</code> environment variable. Doing so will cause the
|
||||
database state to be stored in a file named <code>test.db</code> under the trial process'
|
||||
working directory. Typically, this ends up being <code>_trial_temp/test.db</code>. For example:</p>
|
||||
<pre><code class="language-sh">SYNAPSE_TEST_PERSIST_SQLITE_DB=1 trial tests
|
||||
</code></pre>
|
||||
<p>The database file can then be inspected with:</p>
|
||||
<pre><code class="language-sh">sqlite3 _trial_temp/test.db
|
||||
</code></pre>
|
||||
<p>Note that the database file is cleared at the beginning of each test run. Thus it
|
||||
will always only contain the data generated by the <em>last run test</em>. Though generally
|
||||
when debugging, one is only running a single test anyway.</p>
|
||||
<h3 id="running-tests-under-postgresql"><a class="header" href="#running-tests-under-postgresql">Running tests under PostgreSQL</a></h3>
|
||||
<p>Invoking <code>trial</code> as above will use an in-memory SQLite database. This is great for
|
||||
quick development and testing. However, we recommend using a PostgreSQL database
|
||||
|
|
|
@ -12980,6 +12980,20 @@ trial tests.rest.admin.test_room tests.handlers.test_admin.ExfiltrateData.test_i
|
|||
<p>To increase the log level for the tests, set <code>SYNAPSE_TEST_LOG_LEVEL</code>:</p>
|
||||
<pre><code class="language-sh">SYNAPSE_TEST_LOG_LEVEL=DEBUG trial tests
|
||||
</code></pre>
|
||||
<p>By default, tests will use an in-memory SQLite database for test data. For additional
|
||||
help with debugging, one can use an on-disk SQLite database file instead, in order to
|
||||
review database state during and after running tests. This can be done by setting
|
||||
the <code>SYNAPSE_TEST_PERSIST_SQLITE_DB</code> environment variable. Doing so will cause the
|
||||
database state to be stored in a file named <code>test.db</code> under the trial process'
|
||||
working directory. Typically, this ends up being <code>_trial_temp/test.db</code>. For example:</p>
|
||||
<pre><code class="language-sh">SYNAPSE_TEST_PERSIST_SQLITE_DB=1 trial tests
|
||||
</code></pre>
|
||||
<p>The database file can then be inspected with:</p>
|
||||
<pre><code class="language-sh">sqlite3 _trial_temp/test.db
|
||||
</code></pre>
|
||||
<p>Note that the database file is cleared at the beginning of each test run. Thus it
|
||||
will always only contain the data generated by the <em>last run test</em>. Though generally
|
||||
when debugging, one is only running a single test anyway.</p>
|
||||
<h3 id="running-tests-under-postgresql"><a class="header" href="#running-tests-under-postgresql">Running tests under PostgreSQL</a></h3>
|
||||
<p>Invoking <code>trial</code> as above will use an in-memory SQLite database. This is great for
|
||||
quick development and testing. However, we recommend using a PostgreSQL database
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue