mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Enable more tests.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
//go:build !sqlite3_nosys
|
||||
|
||||
package tests
|
||||
|
||||
import (
|
||||
@@ -9,9 +7,13 @@ import (
|
||||
"github.com/ncruces/go-sqlite3"
|
||||
_ "github.com/ncruces/go-sqlite3/embed"
|
||||
_ "github.com/ncruces/go-sqlite3/tests/testcfg"
|
||||
"github.com/ncruces/go-sqlite3/vfs"
|
||||
)
|
||||
|
||||
func TestBackup(t *testing.T) {
|
||||
if !vfs.SupportsFileLocking {
|
||||
t.Skip("skipping without locks")
|
||||
}
|
||||
t.Parallel()
|
||||
|
||||
backupName := filepath.Join(t.TempDir(), "backup.db")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !sqlite3_nosys
|
||||
//go:build (linux || darwin || windows || freebsd) && !sqlite3_nosys
|
||||
|
||||
package bradfitz
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//go:build !sqlite3_nosys
|
||||
|
||||
package tests
|
||||
|
||||
import (
|
||||
@@ -21,6 +19,10 @@ import (
|
||||
)
|
||||
|
||||
func Test_parallel(t *testing.T) {
|
||||
if !vfs.SupportsFileLocking {
|
||||
t.Skip("skipping without locks")
|
||||
}
|
||||
|
||||
var iter int
|
||||
if testing.Short() {
|
||||
iter = 1000
|
||||
@@ -65,6 +67,10 @@ func Test_memdb(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_adiantum(t *testing.T) {
|
||||
if !vfs.SupportsFileLocking {
|
||||
t.Skip("skipping without locks")
|
||||
}
|
||||
|
||||
var iter int
|
||||
if testing.Short() {
|
||||
iter = 1000
|
||||
@@ -81,6 +87,9 @@ func Test_adiantum(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMultiProcess(t *testing.T) {
|
||||
if !vfs.SupportsFileLocking {
|
||||
t.Skip("skipping without locks")
|
||||
}
|
||||
if testing.Short() {
|
||||
t.Skip("skipping in short mode")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//go:build !sqlite3_nosys
|
||||
|
||||
package tests
|
||||
|
||||
import (
|
||||
@@ -14,6 +12,9 @@ import (
|
||||
)
|
||||
|
||||
func TestWAL_enter_exit(t *testing.T) {
|
||||
if !vfs.SupportsFileLocking {
|
||||
t.Skip("skipping without locks")
|
||||
}
|
||||
t.Parallel()
|
||||
|
||||
file := filepath.Join(t.TempDir(), "test.db")
|
||||
@@ -49,7 +50,6 @@ func TestWAL_readonly(t *testing.T) {
|
||||
if !vfs.SupportsSharedMemory {
|
||||
t.Skip("skipping without shared memory")
|
||||
}
|
||||
|
||||
t.Parallel()
|
||||
|
||||
tmp := filepath.Join(t.TempDir(), "test.db")
|
||||
@@ -76,6 +76,9 @@ func TestWAL_readonly(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestConn_WalCheckpoint(t *testing.T) {
|
||||
if !vfs.SupportsFileLocking {
|
||||
t.Skip("skipping without locks")
|
||||
}
|
||||
t.Parallel()
|
||||
|
||||
file := filepath.Join(t.TempDir(), "test.db")
|
||||
|
||||
Reference in New Issue
Block a user