test

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseTest

func DatabaseTest(t *testing.T, c *Container) (*mongo.Database, error)

func TeardownDatabase

func TeardownDatabase(t *testing.T, c *Container)

StopContainer stops and removes the specified container.

Types

type Container

type Container struct {
	ID   string
	Host string // IP:Port
}

Container tracks information about a docker container started for tests.

func SetupDatabase

func SetupDatabase(t *testing.T) *Container

StartContainer runs a postgres container to execute commands.

Jump to

Keyboard shortcuts

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