diff options
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 49 |
1 files changed, 34 insertions, 15 deletions
@@ -30,6 +30,7 @@ The server depends on CouchDB:: pip install ".[server]" + Compatibility ------------- @@ -40,27 +41,45 @@ Compatibility that platform version implements ephemeral tokens databases and Soledad Server needs to act accordingly. +* Upgrades of Soledad Server < 0.9.0 to >= 0.9.0 need database migration + because older code used to use CouchDB's design documents, while newer code + got rid of that because it made everything cpu and memory hungry. See `the + documentation + <http://soledad.readthedocs.io/en/latest/migrations.html#soledad-server-0-8-to-0-9-couch-database-schema-migration-needed>`_ + for more information. + Tests ----- -System dependencies:: +Soledad's test suite depends on `tox <https://tox.readthedocs.io/en/latest/>`_, +which creates virtual environments and installs all needed dependencies to run +tests. Currently, some tests also depend on availability of a `CouchDB`_ server +(see :ref:`dependency-on-couchdb` for more information). + +Once you have both *tox* and *CouchDB* installed in your system, just run the +``tox`` command in the root of the repository to get started running tests. - python3-venv +.. _dependency-on-couchdb: -Install local dependencies:: +--------------------- +Dependency on CouchDB +--------------------- - $ cd testing - $ pyvenv test-env - $ source test-env/bin/activate - $ pip3 install -U -r requirements-testing.pip +Currently, some tests depend on availability of a CouchDB server. This will +change in the future and only integration tests will depend on CouchDB. -Soledad tests use tox, and they live in the testing folder:: +By default, tests will try to access couch at ``http://127.0.0.1:5984/``. If +you have a CouchDB server running elsewhere, you can pass a custom url to +*pytest* by using the ``--couch-url`` option after two dashes (``--``) when +running tox:: - $ tox + tox -- --couch-url http://couch_host:5984 -Note that to run CouchDB tests, be sure you have `CouchDB`_ installed on your -system. +Tests that depend on couchdb are marked as such with the ``needs_couch`` pytest +marker. You can skip them by avoiding tests with that marker:: + + tox -- -m 'not needs_couch' .. _`CouchDB`: https://couchdb.apache.org/ @@ -70,7 +89,7 @@ In order to prevent privilege escalation, Soledad should not be run as a database administrator. This implies the following side effects: ----------------- -Database creation: +Database creation ----------------- Can be done via a script located in ``pkg/server/soledad-create-userdb`` @@ -91,9 +110,9 @@ then use a parameter called 'create_cmd' to know which command is used to allocate new databases. All steps of creation process is then handled automatically by the server, following the same logic as u1db server. ------------------- -Database deletion: ------------------- +----------------- +Database deletion +----------------- No code at all handles this and privilege to do so needs to be removed as explained before. This can be automated via a simple cron job. |