diff options
Diffstat (limited to 'src/mailman/docs')
| -rw-r--r-- | src/mailman/docs/DATABASE.rst | 21 | ||||
| -rw-r--r-- | src/mailman/docs/NEWS.rst | 3 | ||||
| -rw-r--r-- | src/mailman/docs/START.rst | 33 |
3 files changed, 38 insertions, 19 deletions
diff --git a/src/mailman/docs/DATABASE.rst b/src/mailman/docs/DATABASE.rst index 7e198cd81..688a989e6 100644 --- a/src/mailman/docs/DATABASE.rst +++ b/src/mailman/docs/DATABASE.rst @@ -2,10 +2,10 @@ Setting up your database ======================== -Mailman uses the Storm_ ORM to provide persistence of data in a relational -database. By default, Mailman uses Python's built-in SQLite3_ database, -however, Storm is compatible with PostgreSQL_ and MySQL, among possibly -others. +Mailman uses the SQLAlchemy_ ORM to provide persistence of data in a +relational database. By default, Mailman uses Python's built-in SQLite3_ +database, however, SQLAlchemy is compatible with PostgreSQL_ and MySQL, among +possibly others. Currently, Mailman is known to work with either the default SQLite3 database, or PostgreSQL. (Volunteers to port it to other databases are welcome!). If @@ -14,9 +14,9 @@ you want Mailman to use PostgreSQL, you'll need to set that up first, and then change a configuration variable in your ``/etc/mailman.cfg`` file. Two configuration variables control which database Mailman uses. The first -names the class implementing the database interface. The second names the -Storm URL for connecting to the database. Both variables live in the -``[database]`` section of the configuration file. +names the class implementing the database interface. The second names the URL +for connecting to the database. Both variables live in the ``[database]`` +section of the configuration file. SQLite3 @@ -50,11 +50,6 @@ You would then need to set both the `class` and `url` variables in That should be it. -Note that if you want to run the full test suite against PostgreSQL, you -should make these changes to the ``mailman/testing/testing.cfg`` file (yes, -eventually we'll make this easier), start up PostgreSQL, enter the virtual -environment, and run ``nose2 -vv`` as normal. - If you have any problems, you may need to delete the database and re-create it:: @@ -64,7 +59,7 @@ it:: My thanks to Stephen A. Goss for his contribution of PostgreSQL support. -.. _Storm: http://storm.canonical.com +.. _SQLAlchemy: http://www.sqlalchemy.org/ .. _SQLite3: http://docs.python.org/library/sqlite3.html .. _PostgreSQL: http://www.postgresql.org/ .. _MySQL: http://dev.mysql.com/ diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst index 2881eaacd..057dcb4ff 100644 --- a/src/mailman/docs/NEWS.rst +++ b/src/mailman/docs/NEWS.rst @@ -32,6 +32,9 @@ Development ----------- * You no longer have to create a virtual environment separately when running the test suite. Just use `tox`. + * You no longer have to edit `src/mailman/testing/testing.cfg` to run the + test suite against PostgreSQL. See `src/mailman/docs/START.rst` for + details. Interfaces ---------- diff --git a/src/mailman/docs/START.rst b/src/mailman/docs/START.rst index 8123a726c..794740c64 100644 --- a/src/mailman/docs/START.rst +++ b/src/mailman/docs/START.rst @@ -68,19 +68,40 @@ and basic client API, Postorius, and HyperKitty. Testing Mailman 3 ================= -To run the Mailman test suite, just use the `tox`_ command. `tox` creates a -virtual environment (virtualenv) for you, installs all the dependencies into -that virtualenv, and runs the test suite from that virtualenv. By default it -does not use the `--system-site-packages` so it downloads everything from the -Cheeseshop. +To run the Mailman test suite, just use the `tox`_ command:: + + $ tox + +`tox` creates a virtual environment (virtualenv) for you, installs all the +dependencies into that virtualenv, and runs the test suite from that +virtualenv. By default it does not use the `--system-site-packages` so it +downloads everything from the Cheeseshop. You do have access to the virtualenv, and you can use this to run individual tests, e.g.:: - % .tox/py27/bin/python -m nose2 -vv -P user + $ .tox/py27/bin/python -m nose2 -vv -P user Use `.tox/py27/bin/python -m nose2 --help` for more options. +If you want to run the full test suite against the PostgreSQL database, set +the database up as described in :doc:`DATABASE`, then create a `postgres.cfg` +file any where you want. This `postgres.cfg` file will contain the +``[database]`` section for PostgreSQL, e.g.:: + + [database] + class: mailman.database.postgresql.PostgreSQLDatabase + url: postgres://myuser:mypassword@mypghost/mailman + +Then run the test suite like so:: + + $ MAILMAN_EXTRA_TESTING_CFG=/path/to/postgres.cfg tox -e pg + +If you want to run an individual test against PostgreSQL, you would do it like +so:: + + $ MAILMAN_EXTRA_TESTING_CFG=/path/to/postgres.cfg .tox/pg/bin/python -m nose2 -vv -P user + Building for development ------------------------ |
