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 70
70
The MySQL database should not contain any tables. Tests will not
71
71
drop the database with existing data.
72
72
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.
73
76
74
77
Showing MySQL who's boss
75
78
========================
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ suggest that you install into a python virtual environment.
27
27
.. _PostgreSQL: https://www.postgresql.org/
28
28
29
29
30
-
31
30
Running the PostgreSQL unit tests
32
31
=================================
33
32
@@ -36,7 +35,23 @@ the postgresql database on the local machine and create and drop
36
35
databases. See the config values in 'test/db_test_base.py'
37
36
about which database connection, name and user will be used.
38
37
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
39
50
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
+
40
55
Credit
41
56
======
42
57
You can’t perform that action at this time.
0 commit comments