test-sandbox-0.1.5: Sandbox for system tests

Safe HaskellNone
LanguageHaskell2010

Test.Sandbox.Internals

Synopsis

Documentation

runExceptT' :: ExceptT e m a -> m (Either e a) Source

type Port = Int Source

registerProcess Source

Arguments

:: String

Process Name

-> FilePath

Path to the application binary

-> [String]

Arguments to pass on the command-line

-> Maybe Int

Time to wait (in s.) before checking that the process is still up

-> Maybe Capture

Which outputs to capture (if any)

-> Maybe [(String, String)]

Evironment variables

-> Maybe FilePath

Working directory for the new process

-> Sandbox SandboxedProcess 

whenM :: Monad m => m Bool -> m () -> m () Source

setVariable Source

Arguments

:: Serialize a 
=> String

Variable key for future reference

-> a

Variable value

-> Sandbox a 

Sets a custom variable in the sandbox monad.

checkVariable Source

Arguments

:: String

Variable key

-> Sandbox Bool 

Checks that a custom sandbox variable is set.

getVariable Source

Arguments

:: Serialize a 
=> String

Variable key

-> a

Default value if not found

-> Sandbox a 

Returns the value of a previously set sandbox variable (or a provided default value if unset)

unsetVariable Source

Arguments

:: String

Variable key

-> Sandbox () 

Unsets a custom variable.