Safe Haskell | None |
---|
- testCatalog :: Text -> FinalCatalog -> [Test] -> IO (Either String (), TestsState)
- data Test
- = TestGroup Text [Test]
- | TestFirstOk Text [Test]
- | SingleTest Text (FinalCatalog -> TestResult)
- data TestsState = TestsState {}
- testFileSources :: Text -> FinalCatalog -> Test
- type TestResult = StateT TestsState IO (Either String ())
- type TestMonad = ErrorT String (StateT TestsState IO)
- testingDaemon :: Maybe Text -> Text -> (Text -> IO (Map Text ResolvedValue)) -> IO (Text -> IO (Either String (FinalCatalog, EdgeMap, FinalCatalog)))
- module Puppet.Interpreter.Types
- getFileContent :: FilePath -> RResource -> TestMonad ByteString
- getResource :: Text -> Text -> FinalCatalog -> TestMonad RResource
- fileContent :: FilePath -> Maybe Text -> Text -> (ByteString -> TestMonad ()) -> Test
- isEnsure :: Text -> RResource -> TestMonad ()
- isPresent :: RResource -> TestMonad ()
- isAbsent :: RResource -> TestMonad ()
- checkResource :: Maybe Text -> Text -> Text -> (RResource -> TestMonad ()) -> Test
- checkResources :: Maybe Text -> Text -> [Text] -> (RResource -> TestMonad ()) -> Test
- egrep :: Text -> ByteString -> TestMonad ()
- sha1sum :: Text -> ByteString -> TestMonad ()
- runTests :: Test -> FinalCatalog -> StateT TestsState IO (Either String ())
- sequenceCheck :: [a -> TestMonad b] -> a -> TestMonad [b]
- sequenceCheck_ :: [a -> TestMonad b] -> a -> TestMonad ()
- getParameter :: Text -> RResource -> TestMonad ResolvedValue
- getParameterM :: Text -> RResource -> TestMonad (Maybe ResolvedValue)
- equalOrAbsentParameter :: Text -> ResolvedValue -> RResource -> TestMonad ()
- equalParameter :: Text -> ResolvedValue -> RResource -> TestMonad ()
- equalParameters :: [(Text, ResolvedValue)] -> RResource -> TestMonad ()
- (.>) :: Text -> ResolvedValue -> (Text, ResolvedValue)
- toByteString :: ResolvedValue -> TestMonad ByteString
- runFullTests :: [(Text -> Bool, Test)] -> [(Text, FinalCatalog)] -> IO [(Text, Either String (), TestsState)]
Documentation
testCatalog :: Text -> FinalCatalog -> [Test] -> IO (Either String (), TestsState)Source
TestGroup Text [Test] | |
TestFirstOk Text [Test] | |
SingleTest Text (FinalCatalog -> TestResult) |
testFileSources :: Text -> FinalCatalog -> TestSource
type TestResult = StateT TestsState IO (Either String ())Source
:: 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
module Puppet.Interpreter.Types
getResource :: Text -> Text -> FinalCatalog -> TestMonad RResourceSource
fileContent :: FilePath -> Maybe Text -> Text -> (ByteString -> TestMonad ()) -> TestSource
egrep :: Text -> ByteString -> TestMonad ()Source
Runs a multiline regexp
sha1sum :: Text -> ByteString -> TestMonad ()Source
runTests :: Test -> FinalCatalog -> StateT TestsState IO (Either String ())Source
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)
equalOrAbsentParameter :: Text -> ResolvedValue -> RResource -> TestMonad ()Source
equalParameter :: Text -> ResolvedValue -> RResource -> TestMonad ()Source
equalParameters :: [(Text, ResolvedValue)] -> RResource -> TestMonad ()Source
(.>) :: Text -> ResolvedValue -> (Text, ResolvedValue)Source
runFullTests :: [(Text -> Bool, Test)] -> [(Text, FinalCatalog)] -> IO [(Text, Either String (), TestsState)]Source
Run tests on several hosts at once