Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MappedLocalPort ¶
MappedLocalPort returns a port mapping for a container port that can be used to access the container from the host. The returned string is in the format expected by testcontainers.ContainerRequest ExposedPorts.
This is a workaround for a bug in docker that causes IPv4 and IPv6 port mappings to overlap with different containers on the same host. See: https://github.com/moby/moby/issues/42442.
Types ¶
type HTTPBin ¶
type HTTPBin struct {
// contains filtered or unexported fields
}
HTTPBin represents a docker container running the `kong/httpbin`.
func NewHTTPBin ¶
NewHTTPBin spawns a docker container running the `kong/httpbin` which can be used for proxy routing testing.
type Kong ¶
type Kong struct {
// contains filtered or unexported fields
}
Kong represents a docker container running Kong.
func NewKong ¶
NewKong spawns a docker container running Kong (its image is determined by environment variables). It sets up a cleanup function that will terminate the container when the test finishes.