fixtures

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestServer

func NewTestServer() *httptest.Server

func NewTestServerWithPort

func NewTestServerWithPort(port string) *httptest.Server

func ServedFixtureFile

func ServedFixtureFile(path string) string

ServedFixtureFile serves fixtures/xxx as `file:///xxx`

Types

type Container

type Container struct {
	URI string
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(ctx context.Context, name string, args ...string) *Container

NewContainer creates a new mongodb container, please remember to call `.Clear()` to remove it.

@param ctx
@param args `container name, use the first arg passed in as container name`
@return *Container

func (*Container) Clear

func (m *Container) Clear()

Clear removes the container and volumes created

@receiver m
@param ctx

Jump to

Keyboard shortcuts

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