UserFrosting icon indicating copy to clipboard operation
UserFrosting copied to clipboard

Several fixes for tests

Open ktecho opened this issue 3 years ago • 4 comments

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.

ktecho avatar Aug 05 '21 16:08 ktecho

Codecov Report

Merging #1175 (060be75) into hotfix (5b50529) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            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.

codecov[bot] avatar Aug 05 '21 16:08 codecov[bot]

To confirm, this PR fixes the database tests so that they can be rerun successfully. Correct?

Silic0nS0ldier avatar Aug 06 '21 07:08 Silic0nS0ldier

@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?

ktecho avatar Aug 06 '21 08:08 ktecho

@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.

ktecho avatar Aug 06 '21 08:08 ktecho

Closing this, as it's not relevant with UF5 anymore

lcharette avatar Nov 25 '23 02:11 lcharette