sandwich-contexts-0.3.0.2: Contexts for the Sandwich test library
Safe HaskellNone
LanguageHaskell2010

Test.Sandwich.Contexts.Container

Description

Helper module for working with containers.

Synopsis

Documentation

data ContainerOptions Source #

Type to represent generic options for launching containers.

data ContainerSystem Source #

Type to represent which container system we're using.

waitForHealth :: (HasCallStack, MonadLoggerIO m, MonadMask m) => ContainerSystem -> Text -> m () Source #

Wait for a container to be in a healthy state.

Container/host conversions

containerPortToHostPort :: (HasCallStack, MonadIO m) => ContainerSystem -> Text -> PortNumber -> m PortNumber Source #

Map a port number inside a container to a port number on the host.

containerNameToContainerId :: (HasCallStack, MonadIO m) => ContainerSystem -> Text -> m Text Source #

Convert a container name to a container ID.

Misc

isInContainer :: MonadIO m => m Bool Source #

Test if the test process is currently running in a container.