spawner

package
v0.0.0-...-2597ab7 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package spawner implements the Spawner service to launch arbitrary binaries for use in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(poolMaxWait time.Duration) (pb.SpawnerServiceServer, error)

New returns a newly constructed SpawnerServiceServer. Set poolMaxWait to 0 to use the default dockertest.Pool value (1 minute at time of writing).

func NewPostgres

func NewPostgres(ctx context.Context, dockerTag string, ttl time.Duration) (*pb.PostgresResponse, func(context.Context) error, error)

NewPostgres spawns a new PostgreSQL instance. The returned cleanup function MUST be called to kill the instance.

func NewPostgresT

func NewPostgresT(ctx context.Context, tb testing.TB, dockerTag string, ttl time.Duration) *pb.PostgresResponse

NewPostgresT is equivalent to NewPostGres() except that failures to spawn are reported on tb.Fatal(), and Kill() is called in tb.Cleanup().

func NewT

func NewT(tb testing.TB, poolMaxWait time.Duration) pb.SpawnerServiceServer

NewT is a convenience function for using New() in Go tests. All errors are reported on tb.Fatal().

Types

This section is empty.

Jump to

Keyboard shortcuts

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