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>
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" |