testutil

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed testdata/scripts.js
	GlobalScript string
	//go:embed testdata/task.yaml
	TaskSchema string
	//go:embed testdata/user.yaml
	UserSchema string
	//go:embed testdata/account.yaml
	AccountSchema  string
	AllCollections = []string{AccountSchema, UserSchema, TaskSchema}
)

Functions

func NewTaskDoc

func NewTaskDoc(usrID string) *myjson.Document

func NewUserDoc

func NewUserDoc() *myjson.Document

func SeedUsers added in v0.3.3

func SeedUsers(ctx context.Context, db myjson.Database, perAccount int, tasksPerUser int) error

func TestDB

func TestDB(fn func(ctx context.Context, db myjson.Database), opts ...myjson.DBOpt) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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