chore: terminate container on end

This is not relevant for this PR, as Ryuk is responsible for terminating containers after the test session finishes
This commit is contained in:
Manuel de la Peña
2024-09-18 22:20:42 +02:00
parent 1bb4d922e9
commit f962d64885
7 changed files with 35 additions and 0 deletions

View File

@@ -52,6 +52,11 @@ func mustStartMySQL(t testing.TB) *mysql.MySQLContainer {
mysql.WithDatabase(mysqlDatabase),
)
require.NoError(t, err)
t.Cleanup(func() {
if c != nil {
require.NoError(t, c.Terminate(ctx))
}
})
return c
}