testutil

package
v0.0.0-...-021e601 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertJSON

func AssertJSON(t *testing.T, want, got []byte)

func AssertResponse

func AssertResponse(t *testing.T, got *http.Response, status int, body []byte)

func CloseContainer

func CloseContainer(resource *dockertest.Resource, pool *dockertest.Pool)

func CloseRedisContainer

func CloseRedisContainer(resource *dockertest.Resource, pool *dockertest.Pool)

func ConnectDB

func ConnectDB(resource *dockertest.Resource, pool *dockertest.Pool) (*sqlx.DB, string)

func ConnectRedis

func ConnectRedis(resource *dockertest.Resource, pool *dockertest.Pool) (*redis.Client, string)

func CreateContainer

func CreateContainer() (*dockertest.Resource, *dockertest.Pool)

func CreateRedisContainer

func CreateRedisContainer() (*dockertest.Resource, *dockertest.Pool)

func LoadFile

func LoadFile(t *testing.T, path string) []byte

func OpenRedisForTest

func OpenRedisForTest(t *testing.T) *redis.Client

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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