waku-org/go-waku

View on GitHub
waku/persistence/sqlite/mock.go

Summary

Maintainability
A
0 mins
Test Coverage
D
66%
package sqlite

import (
    "database/sql"
    "log"

    _ "github.com/mattn/go-sqlite3"
)

func NewMockSqliteDB() *sql.DB {
    db, err := sql.Open("sqlite3", ":memory:")
    if err != nil {
        log.Fatalf("an error '%s' was not expected when opening a stub database connection", err)
    }

    return db
}