summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-09-17 12:08:25 -0300
committerdrebs <drebs@riseup.net>2017-09-17 15:50:55 -0300
commitcfff46ff9becdbe5cf48816870e625ed253ecc57 (patch)
tree8d239e4499f559d86ed17ea3632008303b25d485 /README.rst
parentf29abe28bd778838626d12fcabe3980a8ce4fa8c (diff)
[refactor] move tests to root of repository
Tests entrypoint was in a testing/ subfolder in the root of the repository. This was made mainly because we had some common files for tests and we didn't want to ship them (files in testing/test_soledad, which is itself a python package. This sometimes causes errors when loading tests (it seems setuptools is confused with having one python package in a subdirectory of another). This commit moves the tests entrypoint to the root of the repository. Closes: #8952
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst49
1 files changed, 34 insertions, 15 deletions
diff --git a/README.rst b/README.rst
index 66be82fe..3d02c8aa 100644
--- a/README.rst
+++ b/README.rst
@@ -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.