uptrace / bun

SQL-first Golang ORM
https://bun.uptrace.dev
BSD 2-Clause "Simplified" License
3.65k stars 221 forks source link

Cleanup test databases to avoid side-effects #927

Closed bevzzz closed 9 months ago

bevzzz commented 11 months ago

While working on #926 I noticed that many tests did not properly tear down the database schema they create, which results in side-effects to other tests.

Existing tests were not affected, but the ones I wrote for the other PR were, as they rely on having a clean schema. In general, I think leaving no side-effects is a good unit test practice.

vmihailenco commented 9 months ago

Thanks!