beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
46 stars 46 forks source link

Tests that use sandbox db do not clear state after finishing #317

Open jauggy opened 1 month ago

jauggy commented 1 month ago

Context

When you add a user to the sandbox db when running a test it should clear at the end of that test so the user doesn't exist in the next test run. Currently state is kept causing test failure.

Test Steps

Checkout this draft PR https://github.com/beyond-all-reason/teiserver/pull/316 Run the unit test

mix test path/to/clear_db_each_test.exs

It currently fails. Even though I made that PR I have no idea how to solve it so would appreciate if someone can figure it out. If you manage to solve it feel free to open your own PR and I'll close my draft.