mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 08:37:10 +08:00
add TestMain for a few storages and update benchmark workflow
This commit is contained in:
@@ -1,13 +1,25 @@
|
||||
package memcache
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var testStore = New()
|
||||
var testStore *Storage
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testStore = New(Config{
|
||||
Reset: true,
|
||||
})
|
||||
|
||||
code := m.Run()
|
||||
|
||||
_ = testStore.Close()
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
func Test_Memcache_Set(t *testing.T) {
|
||||
var (
|
||||
|
Reference in New Issue
Block a user