mirror of https://github.com/perkeep/perkeep.git
pkg/index/sqlite: fix tests
Long broken since the sha224 switch. Updates #1085 Change-Id: I2dda3dac6bd3c8006be0974bdc9be402e25b7429
This commit is contained in:
parent
edfa4d0d28
commit
c243487bdb
|
@ -28,7 +28,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"go4.org/jsonconfig"
|
"perkeep.org/internal/testhooks"
|
||||||
"perkeep.org/pkg/index"
|
"perkeep.org/pkg/index"
|
||||||
"perkeep.org/pkg/index/indextest"
|
"perkeep.org/pkg/index/indextest"
|
||||||
"perkeep.org/pkg/sorted"
|
"perkeep.org/pkg/sorted"
|
||||||
|
@ -36,6 +36,7 @@ import (
|
||||||
_ "perkeep.org/pkg/sorted/sqlite"
|
_ "perkeep.org/pkg/sorted/sqlite"
|
||||||
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
|
"go4.org/jsonconfig"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -43,6 +44,10 @@ var (
|
||||||
dbAvailable bool
|
dbAvailable bool
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
testhooks.SetUseSHA1(true)
|
||||||
|
}
|
||||||
|
|
||||||
func do(db *sql.DB, sql string) {
|
func do(db *sql.DB, sql string) {
|
||||||
_, err := db.Exec(sql)
|
_, err := db.Exec(sql)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
Loading…
Reference in New Issue