mirror of
https://github.com/gofiber/storage.git
synced 2025-10-06 09:07:14 +08:00
fix: do not close store twice in tests
This commit is contained in:
@@ -142,10 +142,8 @@ func TestSetAndReset_ResetShouldReturn_NoError(t *testing.T) {
|
||||
func TestClose_CloseShouldReturn_NoError(t *testing.T) {
|
||||
testStore, err := newTestStore(t)
|
||||
require.NoError(t, err)
|
||||
defer testStore.Close()
|
||||
|
||||
err = testStore.Close()
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, testStore.Close())
|
||||
}
|
||||
|
||||
func TestGetConn_ReturnsNotNil(t *testing.T) {
|
||||
|
@@ -254,7 +254,6 @@ func Test_Reset(t *testing.T) {
|
||||
func Test_Close(t *testing.T) {
|
||||
testStore, err := newTestStore(t)
|
||||
require.NoError(t, err)
|
||||
defer testStore.Close()
|
||||
|
||||
require.NoError(t, testStore.Close())
|
||||
}
|
||||
|
@@ -186,7 +186,6 @@ func Test_MongoDB_Reset(t *testing.T) {
|
||||
func Test_MongoDB_Close(t *testing.T) {
|
||||
testStore, err := newTestStore(t)
|
||||
require.NoError(t, err)
|
||||
defer testStore.Close()
|
||||
|
||||
require.Nil(t, testStore.Close())
|
||||
}
|
||||
|
@@ -248,7 +248,6 @@ func Test_SslRequiredMode(t *testing.T) {
|
||||
func Test_MSSQL_Close(t *testing.T) {
|
||||
testStore, err := newTestStore(t)
|
||||
require.NoError(t, err)
|
||||
defer testStore.Close()
|
||||
|
||||
require.Nil(t, testStore.Close())
|
||||
}
|
||||
|
@@ -262,7 +262,6 @@ func Test_MYSQL_Non_UTF8(t *testing.T) {
|
||||
func Test_MYSQL_Close(t *testing.T) {
|
||||
testStore, err := newTestStore(t)
|
||||
require.NoError(t, err)
|
||||
defer testStore.Close()
|
||||
|
||||
require.Nil(t, testStore.Close())
|
||||
}
|
||||
|
@@ -257,7 +257,6 @@ func Test_Postgres_Conn(t *testing.T) {
|
||||
func Test_Postgres_Close(t *testing.T) {
|
||||
testStore, err := newTestStore(t)
|
||||
require.NoError(t, err)
|
||||
defer testStore.Close()
|
||||
|
||||
require.Nil(t, testStore.Close())
|
||||
}
|
||||
|
Reference in New Issue
Block a user