mirror of
https://github.com/nkanaev/yarr.git
synced 2025-11-07 18:09:36 +00:00
start storage tests
This commit is contained in:
18
src/storage/storage_test.go
Normal file
18
src/storage/storage_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func testDB() *Storage {
|
||||
log.SetOutput(io.Discard)
|
||||
db, err := New(":memory:")
|
||||
if err != nil {
|
||||
os.Stderr.WriteString(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
log.SetOutput(os.Stderr)
|
||||
return db
|
||||
}
|
||||
Reference in New Issue
Block a user