redistest

package
v0.0.0-...-5346417 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, opt ...redis.Options) (redis.Cmdable, error)

NewClient creates a redis client connected to the redis instance in docker.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithContainerPort

func WithContainerPort(port nat.Port) Option

func WithImageName

func WithImageName(name string) Option

func WithMaxWaitTime

func WithMaxWaitTime(interval time.Duration) Option

func WithWaitInterval

func WithWaitInterval(interval time.Duration) Option

type Redis

type Redis struct {
	dockertest.DockerItemGenerator
	ImageName     string
	ContainerPort nat.Port
	// contains filtered or unexported fields
}

func New

func New(generator dockertest.DockerItemGenerator, opts ...Option) *Redis

func (*Redis) RunInDocker

func (r *Redis) RunInDocker(m *testing.M) int

RunInDocker runs the tests with a redis instance in a docker container.

Jump to

Keyboard shortcuts

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