Mercurial > p > roundup > code
changeset 7409:b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 25 May 2023 15:11:04 -0400 |
| parents | 8a9f1732c4b6 |
| children | b7cd007c2bd6 |
| files | doc/mysql.txt doc/postgresql.txt |
| diffstat | 2 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/mysql.txt Thu May 25 14:49:41 2023 -0400 +++ b/doc/mysql.txt Thu May 25 15:11:04 2023 -0400 @@ -70,6 +70,9 @@ The MySQL database should not contain any tables. Tests will not drop the database with existing data. +Note that ``rounduptest`` is a well known account. You should delete +it and the ``rounduptest`` database and create a new user/database for +production use. Showing MySQL who's boss ========================
--- a/doc/postgresql.txt Thu May 25 14:49:41 2023 -0400 +++ b/doc/postgresql.txt Thu May 25 15:11:04 2023 -0400 @@ -27,7 +27,6 @@ .. _PostgreSQL: https://www.postgresql.org/ - Running the PostgreSQL unit tests ================================= @@ -36,7 +35,23 @@ databases. See the config values in 'test/db_test_base.py' about which database connection, name and user will be used. +At this time the following command will setup the user:: + sudo -u postgres psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres + +Note ``rounduptest`` is a well known account, so you should +remove/disable the account after testing and set up a suitable +production account. You need to remove any database owned by +``rounduptest`` first. So something like this should work:: + + + sudo -u postgres psql -c "DROP DATABASE rounduptest;" -U postgres + sudo -u postgres psql -c "DROP ROLE rounduptest;" -U postgres + +If the ``rounduptest`` database is left in a broken state +(e.g. because of a crash during testing) dropping the database and +restarting the tests should fix it. + Credit ======
