tests

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tests provides utils function for testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenTestDB

func OpenTestDB(
	t *testing.T,
	name string,
	migrate func(*mongo.Database, context.Context) error) (db *mongo.Database, close func(context.Context))

OpenTestDB opens a database Since tests are ran in parallel it also locks it. it should be followed by ReleaseTestDB

func ReleaseTestDB

func ReleaseTestDB()

ReleaseTestDB releases the lock

Types

This section is empty.

Jump to

Keyboard shortcuts

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