testutils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitStore

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

InitStore creates a funcstore 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/funcadmin/testutils"
    _ "modernc.org/sqlite"
)

func SeedDB

func SeedDB(store funcstore.StoreInterface, logger *slog.Logger)

SeedDB populates the store with sample data so the admin panel has enough rows to exercise the manager tables and detail screens.

Types

This section is empty.

Jump to

Keyboard shortcuts

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