test-sandbox-0.1.9: Sandbox for system tests
Safe HaskellNone
LanguageHaskell2010

Test.Sandbox.Internals

Synopsis

Documentation

type Port = Int Source #

data PortID Source #

Constructors

PortNumber PortNumber 

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

Instances details
Generic SandboxSeed Source # 
Instance details

Defined in Test.Sandbox.Internals

Associated Types

type Rep SandboxSeed :: Type -> Type #

Serialize SandboxSeed Source # 
Instance details

Defined in Test.Sandbox.Internals

type Rep SandboxSeed Source # 
Instance details

Defined in Test.Sandbox.Internals

type Rep SandboxSeed = D1 ('MetaData "SandboxSeed" "Test.Sandbox.Internals" "test-sandbox-0.1.9-7VIKFLuztYLBj00GkIPGRv" 'False) (C1 ('MetaCons "SandboxFixedSeed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "SandboxRandomSeed" 'PrefixI 'False) (U1 :: Type -> Type))

data SandboxTestOptions Source #

Instances

Instances details
Generic SandboxTestOptions Source # 
Instance details

Defined in Test.Sandbox.Internals

Associated Types

type Rep SandboxTestOptions :: Type -> Type #

Serialize SandboxTestOptions Source # 
Instance details

Defined in Test.Sandbox.Internals

type Rep SandboxTestOptions Source # 
Instance details

Defined in Test.Sandbox.Internals

type Rep SandboxTestOptions = D1 ('MetaData "SandboxTestOptions" "Test.Sandbox.Internals" "test-sandbox-0.1.9-7VIKFLuztYLBj00GkIPGRv" 'False) (C1 ('MetaCons "SandboxTestOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "stoSeed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SandboxSeed)) :*: S1 ('MetaSel ('Just "stoMaximumGeneratedTests") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "stoMaximumUnsuitableGeneratedTests") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "stoMaximumTestSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))))