Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitStore ¶
func InitStore(filepath string) (logstore.StoreInterface, error)
InitStore creates an in-memory logstore for testing.
Note: The SQLite driver (modernc.org/sqlite) must be imported with a side-effect import in _test.go files of the consuming package, NOT here. This avoids double driver registration panics when a host project that already imports modernc.org/sqlite also imports this testutils package.
Example (in your _test.go file):
import (
"github.com/dracory/logadmin/testutils"
_ "modernc.org/sqlite"
)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.