testing

package
v0.0.0-...-d078b10 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDB

func WithDB(f func(dbtest TestDBRunner) int) int

WithDB will set up a test DB instance and pass it to `f` callback as `dbtest`. Once `f()` is finished, the DB will be cleaned up. Value returned from `f()` is obtained as return status of a call to WithDB().

Types

type TestDBRunner

type TestDBRunner interface {
	Client() *mongo.Client
	Wipe()
	CTX() context.Context
}

TestDBRunner exports selected calls of dbtest.DBServer API, just the ones that are useful in tests.

Jump to

Keyboard shortcuts

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