go mod tidy works now at least.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
//go:build !js && !sqlite_math_functions
|
||||
|
||||
package test
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"fiatjaf.com/nostr/sdk/hints/sqlh"
|
||||
"github.com/stretchr/testify/require"
|
||||
_ "github.com/tursodatabase/go-libsql"
|
||||
)
|
||||
|
||||
func TestSQLiteHintsLibsql(t *testing.T) {
|
||||
path := "/tmp/tmpsdkhintssqlite"
|
||||
os.RemoveAll(path)
|
||||
|
||||
db, err := sql.Open("libsql", "file://"+path)
|
||||
|
||||
require.NoError(t, err, "failed to create sqlitehints db")
|
||||
db.SetMaxOpenConns(1)
|
||||
|
||||
sh, err := sqlh.NewSQLHints(db, "sqlite3")
|
||||
require.NoError(t, err, "failed to setup sqlitehints db")
|
||||
|
||||
runTestWith(t, sh)
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//go:build sqlite_math_functions
|
||||
|
||||
package test
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"fiatjaf.com/nostr/sdk/hints/sqlh"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestSQLiteHintsMattn(t *testing.T) {
|
||||
path := "/tmp/tmpsdkhintssqlite"
|
||||
os.RemoveAll(path)
|
||||
|
||||
db, err := sql.Open("sqlite3", path)
|
||||
|
||||
require.NoError(t, err, "failed to create sqlitehints db")
|
||||
db.SetMaxOpenConns(1)
|
||||
|
||||
sh, err := sqlh.NewSQLHints(db, "sqlite3")
|
||||
require.NoError(t, err, "failed to setup sqlitehints db")
|
||||
|
||||
runTestWith(t, sh)
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//go:build !js
|
||||
|
||||
package test
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"fiatjaf.com/nostr/sdk/hints/sqlh"
|
||||
"github.com/stretchr/testify/require"
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
func TestSQLiteHintsModernC(t *testing.T) {
|
||||
path := "/tmp/tmpsdkhintssqlite"
|
||||
os.RemoveAll(path)
|
||||
|
||||
db, err := sql.Open("sqlite", path)
|
||||
|
||||
require.NoError(t, err, "failed to create sqlitehints db")
|
||||
db.SetMaxOpenConns(1)
|
||||
|
||||
sh, err := sqlh.NewSQLHints(db, "sqlite3")
|
||||
require.NoError(t, err, "failed to setup sqlitehints db")
|
||||
|
||||
runTestWith(t, sh)
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
//go:build !js && !sqlite_math_functions
|
||||
|
||||
package test
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"fiatjaf.com/nostr/sdk/hints/sqlh"
|
||||
_ "github.com/ncruces/go-sqlite3/driver"
|
||||
_ "github.com/ncruces/go-sqlite3/embed"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestSQLiteHintsNcruces(t *testing.T) {
|
||||
path := "/tmp/tmpsdkhintssqlite"
|
||||
os.RemoveAll(path)
|
||||
|
||||
db, err := sql.Open("sqlite3", path)
|
||||
|
||||
require.NoError(t, err, "failed to create sqlitehints db")
|
||||
db.SetMaxOpenConns(1)
|
||||
|
||||
sh, err := sqlh.NewSQLHints(db, "sqlite3")
|
||||
require.NoError(t, err, "failed to setup sqlitehints db")
|
||||
|
||||
runTestWith(t, sh)
|
||||
}
|
||||
Reference in New Issue
Block a user