language-puppet-0.4.0: Tools to parse and evaluate the Puppet DSL.

Safe HaskellNone

Puppet.Testing

Synopsis

Documentation

data TestsState Source

Constructors

TestsState 

Instances

testingDaemonSource

Arguments

:: Maybe Text

Might contain the URL of the actual PuppetDB, used for getting facts.

-> Text

Path to the manifests

-> (Text -> IO (Map Text ResolvedValue))

The facter function

-> IO (Text -> IO (Either String (FinalCatalog, EdgeMap, FinalCatalog))) 

Initializes a daemon made for running tests, using the specific test puppetDB

egrep :: Text -> ByteString -> TestMonad ()Source

Runs a multiline regexp

sequenceCheck :: [a -> TestMonad b] -> a -> TestMonad [b]Source

Let you sequence several checks with the same input. Useful for the | checkResource function

sequenceCheck_ :: [a -> TestMonad b] -> a -> TestMonad ()Source

Same thing but without output, even more useful for the checkResource | function

getParameterM :: Text -> RResource -> TestMonad (Maybe ResolvedValue)Source

Gets a resource parameter value as a (Maybe Text)

runFullTests :: [(Text -> Bool, Test)] -> [(Text, FinalCatalog)] -> IO [(Text, Either String (), TestsState)]Source

Run tests on several hosts at once