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"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testDB() *Storage {
|
func testDB() *Storage {
|
||||||
log.SetOutput(io.Discard)
|
log.SetOutput(io.Discard)
|
||||||
db, err := New(":memory:")
|
db, _ := New(":memory:")
|
||||||
if err != nil {
|
|
||||||
os.Stderr.WriteString(err.Error())
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
log.SetOutput(os.Stderr)
|
log.SetOutput(os.Stderr)
|
||||||
return db
|
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