oficina / equipo Public

equipo: hostedrun tests remove their template database

The package's TestMain removes the migrated template it copies for each
rig once the tests have run, so nothing is left in TMPDIR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev cb81f75e5aca3bfbef62a2031b907c6c763497c6 parent 938a8a3
1 file changed, +7 −1
  • internal/equipo/hostedrun/dispatcher_test.go +7 −1
diff --git a/internal/equipo/hostedrun/dispatcher_test.go b/internal/equipo/hostedrun/dispatcher_test.go
index 4e8a739b..5ff15e03 100644
--- a/internal/equipo/hostedrun/dispatcher_test.go
+++ b/internal/equipo/hostedrun/dispatcher_test.go
@@ -33,7 +33,13 @@ import (
"gorm.io/gorm"
)
-func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }
+func TestMain(m *testing.M) {
+ code := budget.Main(m)
+ if template.dir != "" {
+ _ = os.RemoveAll(template.dir)
+ }
+ os.Exit(code)
+}
const (
owner = "owner@example.com"