🧹 introduce reset and close

This commit is contained in:
Fenny
2020-11-06 01:41:46 +01:00
parent 1634e44e61
commit f9a30234b9
28 changed files with 125 additions and 87 deletions

View File

@@ -8,7 +8,7 @@ import (
)
var testStore = New(Config{
Clear: true,
Reset: true,
})
func Test_MongoDB_Set(t *testing.T) {
@@ -106,7 +106,7 @@ func Test_MongoDB_Clear(t *testing.T) {
err = testStore.Set("john2", val, 0)
utils.AssertEqual(t, nil, err)
err = testStore.Clear()
err = testStore.Reset()
utils.AssertEqual(t, nil, err)
result, err := testStore.Get("john1")