testhelper

package
v0.0.0-...-ba64992 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup()

func InsertDocumentsFromJson

func InsertDocumentsFromJson[D interface{}](collectionName string, jsonRaw []byte)

func NewOsFs

func NewOsFs() afero.Fs

func SetTimeout

func SetTimeout(timeout time.Duration)

func Setup

func Setup()

func TestMain

func TestMain(m *testing.M)

Types

type TestEnv

type TestEnv struct {
	Ctx context.Context

	MongoServer *mim.Server
	// contains filtered or unexported fields
}

func GetTestEnv

func GetTestEnv() *TestEnv

func (*TestEnv) GetMongoDatabase

func (e *TestEnv) GetMongoDatabase() *mongo.Database

func (*TestEnv) GetMongoUri

func (e *TestEnv) GetMongoUri() string

func (*TestEnv) InsertDocument

func (e *TestEnv) InsertDocument(collectionName string, doc interface{})

func (*TestEnv) InsertDocuments

func (e *TestEnv) InsertDocuments(collectionName string, documents []interface{})

Jump to

Keyboard shortcuts

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