UserFrosting
UserFrosting copied to clipboard
Several fixes for tests
At this point, all the tables from the standard migration have been created in previous tests, so tables like users
or roles
cannot be created again.
Codecov Report
Merging #1175 (060be75) into hotfix (5b50529) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## hotfix #1175 +/- ##
=========================================
Coverage 70.68% 70.68%
Complexity 1984 1984
=========================================
Files 173 173
Lines 6911 6911
=========================================
Hits 4885 4885
Misses 2026 2026
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5b50529...060be75. Read the comment docs.
To confirm, this PR fixes the database tests so that they can be rerun successfully. Correct?
@Silic0nS0ldier No, this fixes are needed to run the tests in a separate database/connection than the main one.
I cannot explain why it works here in github, but it's needed for the tests to pass in a separate MySQL.
I was talking about this with @lcharette yesterday... Maybe the tests are always running in an "in memory" database so we don't need to clear the database between tests?
@Silic0nS0ldier I want to update the docker-compose
file to run another MySQL for tests, so you can do php bakery test
whenever you want and run the tests in the devel environment without having to run another set of containers.
I have it running in our project, but this fixes are needed for the tests to pass.
Closing this, as it's not relevant with UF5 anymore