Documentation
¶
Overview ¶
Package wait provides functionalities for mocking testcontainers-go/wait.
Index ¶
- Variables
- type Strategy
- type StrategyMocker
- type StrategyTarget
- func (s *StrategyTarget) Exec(ctx context.Context, cmd []string) (int, io.Reader, error)
- func (s *StrategyTarget) Host(ctx context.Context) (string, error)
- func (s *StrategyTarget) Logs(ctx context.Context) (io.ReadCloser, error)
- func (s *StrategyTarget) MappedPort(ctx context.Context, port nat.Port) (nat.Port, error)
- func (s *StrategyTarget) Ports(ctx context.Context) (nat.PortMap, error)
- func (s *StrategyTarget) State(ctx context.Context) (*types.ContainerState, error)
- type StrategyTargetMocker
Constants ¶
This section is empty.
Variables ¶
var NoMockStrategy = MockStrategy()
NoMockStrategy is no mock Strategy.
var NoMockStrategyTarget = MockStrategyTarget()
NoMockStrategyTarget is no mock StrategyTarget.
Functions ¶
This section is empty.
Types ¶
type Strategy ¶
Strategy is a wait.Strategy.
func (*Strategy) WaitUntilReady ¶
WaitUntilReady satisfies wait.Strategy interface.
type StrategyMocker ¶
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 ¶
StrategyTarget is a wait.StrategyTarget.
func (*StrategyTarget) Host ¶
func (s *StrategyTarget) Host(ctx context.Context) (string, error)
Host satisfies wait.StrategyTarget interface.
func (*StrategyTarget) Logs ¶
func (s *StrategyTarget) Logs(ctx context.Context) (io.ReadCloser, error)
Logs satisfies wait.StrategyTarget interface.
func (*StrategyTarget) MappedPort ¶
MappedPort satisfies wait.StrategyTarget interface.
func (*StrategyTarget) State ¶
func (s *StrategyTarget) State(ctx context.Context) (*types.ContainerState, error)
State satisfies wait.StrategyTarget interface.
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.