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:
Manuel de la Peña
2025-08-28 19:20:19 +02:00
parent 512460cf63
commit b3b63a72b8
3 changed files with 49 additions and 37 deletions

View File

@@ -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)