testingcontainers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresContainer

func NewPostgresContainer() (string, func(context.Context) error, error)

NewPostgresContainer return a postgres url to tests execute queries.

func NewRedisContainer

func NewRedisContainer() (string, func(context.Context) error, error)

NewRedisContainer return a Redis url to tests.

func RunMigrateDatabase

func RunMigrateDatabase(postgresURL, migrationsURL string) error

RunMigrateDatabase execute all migrations against a database. Example: postgresURL := "postgres://%s:%s@localhost:%s/ledger-exp?sslmode=disable"

_, callerPath, _, _ := runtime.Caller(0) migrationsURL := fmt.Sprintf("file://%s/../../migrations/", filepath.Dir(callerPath)).

Types

This section is empty.

Jump to

Keyboard shortcuts

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