testutil

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

file: testutil/mongo_container.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEnv

type TestEnv struct {
	MongoClient *mongo.Client
	// contains filtered or unexported fields
}

func SetupMongoDBContainer

func SetupMongoDBContainer(ctx context.Context) (*TestEnv, error)

SetupMongoDBContainer sets up the MongoDB container and returns a TestEnv.

func (*TestEnv) Teardown

func (env *TestEnv) Teardown(ctx context.Context) error

Teardown stops the MongoDB container and cleans up resources.

Jump to

Keyboard shortcuts

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