wait

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package wait provides functionalities for mocking testcontainers-go/wait.

Index

Constants

This section is empty.

Variables

View Source
var NopStrategy = MockStrategy()

NopStrategy is no mock Strategy.

View Source
var NopStrategyTarget = MockStrategyTarget()

NopStrategyTarget is no mock StrategyTarget.

Functions

This section is empty.

Types

type Strategy

type Strategy struct {
	mock.Mock
}

Strategy is an autogenerated mock type for the Strategy type

func NewStrategy added in v0.7.0

func NewStrategy(t interface {
	mock.TestingT
	Cleanup(func())
}) *Strategy

NewStrategy creates a new instance of Strategy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Strategy) WaitUntilReady

func (_m *Strategy) WaitUntilReady(_a0 context.Context, _a1 wait.StrategyTarget) error

WaitUntilReady provides a mock function with given fields: _a0, _a1

type StrategyMocker

type StrategyMocker func(tb testing.TB) *Strategy

StrategyMocker is Strategy mocker.

func MockStrategy

func MockStrategy(mocks ...func(s *Strategy)) StrategyMocker

MockStrategy creates Strategy mock with cleanup to ensure all the expectations are met.

type StrategyTarget

type StrategyTarget struct {
	mock.Mock
}

StrategyTarget is an autogenerated mock type for the StrategyTarget type

func NewStrategyTarget added in v0.7.0

func NewStrategyTarget(t interface {
	mock.TestingT
	Cleanup(func())
}) *StrategyTarget

NewStrategyTarget creates a new instance of StrategyTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*StrategyTarget) Exec

func (_m *StrategyTarget) Exec(_a0 context.Context, _a1 []string, _a2 ...exec.ProcessOption) (int, io.Reader, error)

Exec provides a mock function with given fields: _a0, _a1, _a2

func (*StrategyTarget) Host

func (_m *StrategyTarget) Host(_a0 context.Context) (string, error)

Host provides a mock function with given fields: _a0

func (*StrategyTarget) Inspect added in v0.14.0

func (_m *StrategyTarget) Inspect(_a0 context.Context) (*types.ContainerJSON, error)

Inspect provides a mock function with given fields: _a0

func (*StrategyTarget) Logs

func (_m *StrategyTarget) Logs(_a0 context.Context) (io.ReadCloser, error)

Logs provides a mock function with given fields: _a0

func (*StrategyTarget) MappedPort

func (_m *StrategyTarget) MappedPort(_a0 context.Context, _a1 nat.Port) (nat.Port, error)

MappedPort provides a mock function with given fields: _a0, _a1

func (*StrategyTarget) Ports added in v0.6.0

func (_m *StrategyTarget) Ports(ctx context.Context) (nat.PortMap, error)

Ports provides a mock function with given fields: ctx

func (*StrategyTarget) State

State provides a mock function with given fields: _a0

type StrategyTargetMocker

type StrategyTargetMocker func(tb testing.TB) *StrategyTarget

StrategyTargetMocker is StrategyTarget mocker.

func MockStrategyTarget

func MockStrategyTarget(mocks ...func(t *StrategyTarget)) StrategyTargetMocker

MockStrategyTarget creates StrategyTarget mock with cleanup to ensure all the expectations are met.

Jump to

Keyboard shortcuts

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