File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 7070The MySQL database should not contain any tables. Tests will not
7171drop the database with existing data.
7272
73+ Note that ``rounduptest`` is a well known account. You should delete
74+ it and the ``rounduptest`` database and create a new user/database for
75+ production use.
7376
7477Showing MySQL who's boss
7578========================
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ suggest that you install into a python virtual environment.
2727.. _PostgreSQL: https://www.postgresql.org/
2828
2929
30-
3130Running the PostgreSQL unit tests
3231=================================
3332
@@ -36,7 +35,23 @@ the postgresql database on the local machine and create and drop
3635databases. See the config values in 'test/db_test_base.py'
3736about which database connection, name and user will be used.
3837
38+ At this time the following command will setup the user::
39+
40+ sudo -u postgres psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres
41+
42+ Note ``rounduptest`` is a well known account, so you should
43+ remove/disable the account after testing and set up a suitable
44+ production account. You need to remove any database owned by
45+ ``rounduptest`` first. So something like this should work::
46+
47+
48+ sudo -u postgres psql -c "DROP DATABASE rounduptest;" -U postgres
49+ sudo -u postgres psql -c "DROP ROLE rounduptest;" -U postgres
3950
51+ If the ``rounduptest`` database is left in a broken state
52+ (e.g. because of a crash during testing) dropping the database and
53+ restarting the tests should fix it.
54+
4055Credit
4156======
4257
You can’t perform that action at this time.
0 commit comments