mongotest

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package mongotest gives each test that writes to a live MongoDB a database of its own, and drops it when the test ends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Database

func Database(t testing.TB, dsn string) string

Database returns dsn with its database replaced by a random one, and registers a cleanup that drops that database. It refuses the default port.

Types

This section is empty.

Jump to

Keyboard shortcuts

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