mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
bump
This commit is contained in:
parent
09bfc47ef0
commit
9e95f71de8
@ -4,15 +4,22 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func testDB() *Storage {
|
||||
log.SetOutput(io.Discard)
|
||||
db, err := New(":memory:")
|
||||
if err != nil {
|
||||
os.Stderr.WriteString(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
db, _ := New(":memory:")
|
||||
log.SetOutput(os.Stderr)
|
||||
return db
|
||||
}
|
||||
|
||||
func TestStorage(t *testing.T) {
|
||||
db, err := New(":memory:")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if db == nil {
|
||||
t.Fatal("no db")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user