fix: do not close twice in mysql test

This commit is contained in:
Manuel de la Peña
2024-09-20 00:33:23 +02:00
parent 153c837357
commit 43a47ef467

View File

@@ -64,7 +64,6 @@ func mustStartMySQL(t testing.TB) *mysql.MySQLContainer {
func Test_MYSQL_New(t *testing.T) {
testStore, err := newTestStore(t)
require.NoError(t, err)
defer testStore.Close()
require.True(t, testStore.db != nil)
require.NoError(t, testStore.Close())
@@ -81,7 +80,7 @@ func Test_MYSQL_New(t *testing.T) {
})
require.True(t, newConfigStore.db != nil)
newConfigStore.Close()
// no need to close the newConfigStore since the testStore is called in the defer
}
func Test_MYSQL_Set(t *testing.T) {