sandwich-contexts-0.3.0.1: Contexts for the Sandwich test library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Sandwich.Contexts.Container

Description

Helper module for working with containers.

Synopsis

Documentation

data ContainerSystem Source #

Type to represent which container system we're using.

waitForHealth :: forall m. (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.