-
Notifications
You must be signed in to change notification settings - Fork 64
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
drop test tables on cleanup #138
base: master
Are you sure you want to change the base?
Conversation
Fixes WordPress#110 Adds functionality via `mysqli` on functions & cleanup to remove test tables from the database.
new line eof
Thanks much for the PR! I took a look, and I think this wouldn't work as expected when the database is only accessible from the test environment (when the test environment is not the same as the prepare one). You can see an example in cleanup.php of how it's done for removing files. Maybe something similar to that would work? |
Hey @getsource , sure yeah, that's why I mentioned it in the issue comment since I'm only working locally :D . If This would work both locally and remotely I suppose. |
Ah, sorry, I missed the issue comment! Yes, I think something like that makes sense. The only thing that comes to mind is that I think that would result in the MySQL password being stored in logs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could get into issues if ever $prefix
needed SQL escaping, but seems unlikely.
mysql
as a command generally got phased out of MariaDB-11.0+ an use mariadb
instead.
MYSQL_PWD as an env variable for password still generally works, though could create a configuration file with [mysql]\npassword=....
and pass that to the command.
Fixes #110
Adds functionality to remove test tables from the database during cleanup.