-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to reset the database #46
Conversation
The ability to reset the database before a test group runs can be necessary when using previous branch (e.g. when using the `-b` flag) as that code may assume an older database schema structure that the database may not have. Resetting the db will also become critical when tests are introduced that make changes to the database (e.g. tests that edit an article ). Providing this flag enables the ability for each test group to be completely isolated from the side effects that another test group may cause. Additionally: * Update database seed file to `database_2022-06-13_12-27-44-0600(MDT).tar.gz` to fix `crash` messages appearing in the mysql logs. * Revise `db:save` npm script to enable "slow shutdown" of mysql prior to taking a physical backup. Mysql states this is needed in their docs [1] * Revise healthcheck logic in docker compose after noticing the healthcheck reporting that the db was healthy when it wasn't accepting any connections yet. Relying on a `status` query for the my_wiki should be more reliable. [1] https://dev.mysql.com/doc/refman/8.0/en/innodb-backup.html
I went to http://localhost:3000/wiki/Main_Page and edited the page. After running |
Yes. This commit's main focus was adding a For example, if a test group were to edit the It also adds a |
Now getting:
|
Since this patch changes the database docker image, you'll need to run |
The ability to reset the database before a test group runs can be necessary when
using previous branch (e.g. when using the
-b
flag) as that code may assume anolder database schema structure that the database may not have.
Resetting the db will also become critical when tests are introduced that make
changes to the database (e.g. tests that edit an article ). Providing this flag
enables the ability for each test group to be completely isolated from the side
effects that another test group may cause.
Additionally:
Update database seed file to
database_2022-06-13_12-27-44-0600(MDT).tar.gz
to fix
crash
messages appearing in the mysql logs.Revise
db:save
npm script to enable "slow shutdown" of mysql prior to taking a physical backup. Mysql states this is needed in their docs [1]Revise healthcheck logic in docker compose after noticing the healthcheck
reporting that the db was healthy when it wasn't accepting any connections yet.
Relying on a
status
query for the my_wiki should be more reliable.[1] https://dev.mysql.com/doc/refman/8.0/en/innodb-backup.html