testutils

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitStore

func InitStore(filepath string) (shopstore.StoreInterface, error)

InitStore creates an in-memory shopstore 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/shopadmin/testutils"
    _ "modernc.org/sqlite"
)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL