go mod tidy works now at least.

This commit is contained in:
fiatjaf
2025-04-15 18:39:14 -03:00
parent 2b5b646a62
commit cb0dd45a32
37 changed files with 540 additions and 917 deletions

View File

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

View File

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

View File

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

View File

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