Safe Haskell | None |
---|---|
Language | Haskell2010 |
Test.Sandwich.Contexts.Container
Contents
Description
Helper module for working with containers.
Synopsis
- data ContainerOptions = ContainerOptions {}
- defaultContainerOptions :: ContainerOptions
- data ContainerSystem
- waitForHealth :: (HasCallStack, MonadLoggerIO m, MonadMask m) => ContainerSystem -> Text -> m ()
- containerPortToHostPort :: (HasCallStack, MonadIO m) => ContainerSystem -> Text -> PortNumber -> m PortNumber
- containerNameToContainerId :: (HasCallStack, MonadIO m) => ContainerSystem -> Text -> m Text
- isInContainer :: MonadIO m => m Bool
Documentation
data ContainerOptions Source #
Type to represent generic options for launching containers.
Constructors
ContainerOptions | |
Instances
Show ContainerOptions Source # | |
Defined in Test.Sandwich.Contexts.Container Methods showsPrec :: Int -> ContainerOptions -> ShowS # show :: ContainerOptions -> String # showList :: [ContainerOptions] -> ShowS # | |
Eq ContainerOptions Source # | |
Defined in Test.Sandwich.Contexts.Container Methods (==) :: ContainerOptions -> ContainerOptions -> Bool # (/=) :: ContainerOptions -> ContainerOptions -> Bool # |
data ContainerSystem Source #
Type to represent which container system we're using.
Constructors
ContainerSystemDocker | |
ContainerSystemPodman |
Instances
Show ContainerSystem Source # | |
Defined in Test.Sandwich.Contexts.Container Methods showsPrec :: Int -> ContainerSystem -> ShowS # show :: ContainerSystem -> String # showList :: [ContainerSystem] -> ShowS # | |
Eq ContainerSystem Source # | |
Defined in Test.Sandwich.Contexts.Container Methods (==) :: ContainerSystem -> ContainerSystem -> Bool # (/=) :: ContainerSystem -> ContainerSystem -> Bool # |
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.