Skip to content

Commit 13dbdd7

Browse files
committed
Add warning rounduptest user: pg;mysql; add db account creation pg
1 parent 4d076af commit 13dbdd7

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

doc/mysql.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ this:
7070
The MySQL database should not contain any tables. Tests will not
7171
drop 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

7477
Showing MySQL who's boss
7578
========================

doc/postgresql.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ suggest that you install into a python virtual environment.
2727
.. _PostgreSQL: https://www.postgresql.org/
2828

2929

30-
3130
Running the PostgreSQL unit tests
3231
=================================
3332

@@ -36,7 +35,23 @@ the postgresql database on the local machine and create and drop
3635
databases. See the config values in 'test/db_test_base.py'
3736
about 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+
4055
Credit
4156
======
4257

0 commit comments

Comments
 (0)