TestcontainerEx.Wait (testcontainer_ex v0.3.0)

Copy Markdown View Source

Convenience aliases for all wait strategies.

Instead of importing individual strategy modules, you can use this single module to access all wait strategies:

import TestcontainerEx.Wait

# Equivalent to:
# import TestcontainerEx.PortWaitStrategy
# import TestcontainerEx.HttpWaitStrategy
# import TestcontainerEx.LogWaitStrategy
# import TestcontainerEx.CommandWaitStrategy

Strategies

StrategyReady when...
PortWaitStrategya TCP port accepts connections
HttpWaitStrategyan HTTP request succeeds
LogWaitStrategya log line matches a regex
CommandWaitStrategya command exits with code 0

Summary

Functions

command(command, timeout \\ 5000, retry_delay \\ 200)

See TestcontainerEx.CommandWaitStrategy.new/3.

http(endpoint, port, options \\ [])

See TestcontainerEx.HttpWaitStrategy.new/3.

log(log_regex, timeout \\ 5000, retry_delay \\ 200)

See TestcontainerEx.LogWaitStrategy.new/3.

port(ip, port, timeout \\ 5000, retry_delay \\ 200)

See TestcontainerEx.PortWaitStrategy.new/4.