Enable more tests.

This commit is contained in:
Nuno Cruces
2024-05-02 23:22:43 +01:00
parent 67d859a5b4
commit e0a209908b
8 changed files with 50 additions and 15 deletions

View File

@@ -1,5 +1,3 @@
//go:build !sqlite3_nosys
package driver
import (
@@ -17,6 +15,7 @@ import (
_ "github.com/ncruces/go-sqlite3/embed"
"github.com/ncruces/go-sqlite3/internal/util"
_ "github.com/ncruces/go-sqlite3/tests/testcfg"
"github.com/ncruces/go-sqlite3/vfs"
)
func Test_Open_dir(t *testing.T) {
@@ -82,6 +81,9 @@ func Test_Open_pragma_invalid(t *testing.T) {
}
func Test_Open_txLock(t *testing.T) {
if !vfs.SupportsFileLocking {
t.Skip("skipping without locks")
}
t.Parallel()
db, err := sql.Open("sqlite3", "file:"+
@@ -128,6 +130,9 @@ func Test_Open_txLock_invalid(t *testing.T) {
}
func Test_BeginTx(t *testing.T) {
if !vfs.SupportsFileLocking {
t.Skip("skipping without locks")
}
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())

View File

@@ -1,4 +1,4 @@
//go:build !sqlite3_nosys
//go:build (linux || darwin || windows || freebsd) && !sqlite3_nosys
package driver_test