test-sandbox-0.1.7: Sandbox for system tests

Safe HaskellNone
LanguageHaskell2010

Test.Sandbox.Internals

Synopsis

Documentation

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.

data SandboxSeed Source #

Instances

Generic SandboxSeed Source # 

Associated Types

type Rep SandboxSeed :: * -> * #

Serialize SandboxSeed Source # 
type Rep SandboxSeed Source # 
type Rep SandboxSeed = D1 (MetaData "SandboxSeed" "Test.Sandbox.Internals" "test-sandbox-0.1.7-SY1YJEl0tZImdhi94zjWu" False) ((:+:) (C1 (MetaCons "SandboxFixedSeed" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) (C1 (MetaCons "SandboxRandomSeed" PrefixI False) U1))