-
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
If cleanup.php doesn't fully wipe the DB, it can cause failures. #110
Comments
Okay it LOOKS like cleanup.php isn't nuking the DB tables, which I thought it was supposed to? |
Confirmed. Once I wiped out the database and let it rebuild clean, it was fine. So yeah, that;'s a thing, |
Thanks @Ipstenu ! In core, manual cleanup isn't necessary (as far as I'm aware), so I'm wondering what might be different in this particular case. |
The best guess I have is that somehow something was corrupted, and since the cleanup doesn't wipe the DB, there it stayed. Usually the DB changes are additive to WP, but it might be smart to tweak that in advance of DB changes down the road. |
I can confirm this was the error with the Conetix tests failing as well. Manually deleting the database tables and re-running corrected the issue. |
Fixes WordPress#110 Adds functionality via `mysqli` on functions & cleanup to remove test tables from the database.
I've been using the code in #138 on my setups since i also wanted a clean start always. Most likely it's fine as it is to be merged & used in general (no issues on my end at least 😁 ) but feel free to point out any extra ideas. I didn't want to go via a $wpdb route as including wp-load or anything like that would most likely start to return warnings for headers etc and wanted an as clean as possible output for logging so I decided to just go for a pretty straightforward mysqli way. Note I've been using this on "local" setups, not sure if the remote setup would need something different (and I have no way to test it atm). |
There's really no other place to post these errors. I get them running the normal tests. Nothing on my end changed that I know of. I've tried upgrading all the things.
User with administrator role has capabilities that aren't being tested
Failed asserting that two arrays are equal.
/phpunit-test-runner/wp-test-runner/tests/phpunit/tests/user/capabilities.php:381
These primitive capabilities are not tested
/phpunit-test-runner/wp-test-runner/tests/phpunit/tests/user/capabilities.php:423
I'm not sure how/where this broke (I was out for a while)
The text was updated successfully, but these errors were encountered: