mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 16:48:25 +08:00
feat: storage must implement a Conn method
At the moment, Aerospike and Clickhouse are the only ones not implementing it, even though it's mentioned in their docs.
This commit is contained in:
@@ -132,15 +132,9 @@ func Test_MYSQL_Non_UTF8(t *testing.T) {
|
||||
require.Equal(t, val, result)
|
||||
}
|
||||
|
||||
func Test_MYSQL_Conn(t *testing.T) {
|
||||
testStore := newTestStore(t)
|
||||
defer testStore.Close()
|
||||
|
||||
require.True(t, testStore.Conn() != nil)
|
||||
}
|
||||
|
||||
func TestMySQLStorageTCK(t *testing.T) {
|
||||
s, err := tck.New(context.Background(), t, &MySQLStorageTCK{}, tck.PerTest)
|
||||
// The TCK needs the concrete type of the storage and the driver type returned by the Conn method.
|
||||
s, err := tck.New[*Storage, *sql.DB](context.Background(), t, &MySQLStorageTCK{}, tck.PerTest)
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.Run(t, &s)
|
||||
|
Reference in New Issue
Block a user