Mercurial > p > roundup > code
changeset 7399:deb8e7e6d66d
Skip redis tests if unable to communicate with the server.
If the redis module is in the test environment, the redis tests will
not be skipped. If connecting to redis during testing fails with a
ConnectionError because there is no redis server at localhost, or if
it fails with an AuthenticationError, you would fail a slew of tests.
This causes the tests to report as skipped if either of the two errors
occurs. It is very inefficient as it fails in setup() for the tests,
but at least it does report skipping the tests.
Also documented how to pass the redis password to the tests in the
test part of the install docs. Future note: running tests needs proper
docs in development.txt (including database setup) and a link left to
that doc in installation.txt.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 24 May 2023 12:52:53 -0400 |
| parents | 07f8737fe04c |
| children | d364ef1d66c2 |
| files | doc/installation.txt |
| diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/installation.txt Wed May 24 12:52:43 2023 -0400 +++ b/doc/installation.txt Wed May 24 12:52:53 2023 -0400 @@ -2126,6 +2126,12 @@ pytest test`` in the Roundup source directory and make sure there are no errors. If there are errors, please let us know! +Note that redis tests uses database 15 of the redis server running on +localhost.The tests verify that the database is empty before the redis +tests start. If you use a password on your redis database it can be +specified in the ``pytest_redis_pw`` environment variable when you run +the test. + .. _`user guide`: user_guide.html .. _`roundup specification`: spec.html .. _`tracker configuration`: reference.html#tracker-configuration
