test: add test database cleaner in subprocess (#19844)

fixes https://github.com/coder/internal/issues/927

Adds a small subprocess that outlives the testing process to clean up any leaked test databases.
This commit is contained in:
Spike Curtis
2025-09-22 15:27:06 +04:00
committed by GitHub
parent 596fdcba81
commit e2f5401fb2
4 changed files with 249 additions and 1 deletions
@@ -0,0 +1,7 @@
package main
import "github.com/coder/coder/v2/coderd/database/dbtestutil"
func main() {
dbtestutil.RunCleaner()
}