Safe Haskell | None |
---|
- module Control.Lens
- module Data.Monoid
- module Puppet.PP
- module Puppet.Interpreter.Types
- module Puppet.Lens
- hspec :: Spec -> IO ()
- basicTest :: PSpec
- usersGroupsDefined :: PSpec
- testingDaemon :: PuppetDBAPI IO -> FilePath -> (Text -> IO Facts) -> IO (Text -> IO (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource])))
- defaultDaemon :: FilePath -> IO (Text -> IO (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource])))
- testCatalog :: Nodename -> FilePath -> FinalCatalog -> PSpec -> IO Summary
- describeCatalog :: Nodename -> FilePath -> FinalCatalog -> PSpec -> Spec
- it :: Example a => String -> PSpecM a -> PSpec
- shouldBe :: (Show a, Eq a) => a -> a -> PSpecM Expectation
- type PSpec = PSpecM ()
- type PSpecM = ReaderT TestEnv SpecM
- lCatalog :: HasTestEnv t => Lens' t FinalCatalog
- lModuledir :: HasTestEnv t => Lens' t FilePath
- lPuppetdir :: HasTestEnv t => Lens' t FilePath
- withResource :: String -> Text -> Text -> (Resource -> Expectation) -> PSpec
- withParameter :: Text -> Resource -> (PValue -> Expectation) -> Expectation
- withParameters :: [(Text, PValue)] -> Resource -> Expectation
- withFileContent :: String -> Text -> (Text -> Expectation) -> PSpec
Documentation
module Control.Lens
module Data.Monoid
module Puppet.PP
module Puppet.Interpreter.Types
module Puppet.Lens
Run given spec and write a report to stdout
.
Exit with exitFailure
if at least one spec item fails.
usersGroupsDefined :: PSpecSource
This tests that all users and groups used as resource parameters are defined
:: PuppetDBAPI IO | Contains the puppetdb API functions |
-> FilePath | Path to the manifests |
-> (Text -> IO Facts) | The facter function |
-> IO (Text -> IO (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource]))) |
Initializes a daemon made for running tests, using the specific test puppetDB
defaultDaemon :: FilePath -> IO (Text -> IO (Either PrettyError (FinalCatalog, EdgeMap, FinalCatalog, [Resource])))Source
A default testing daemon.
testCatalog :: Nodename -> FilePath -> FinalCatalog -> PSpec -> IO SummarySource
describeCatalog :: Nodename -> FilePath -> FinalCatalog -> PSpec -> SpecSource
lCatalog :: HasTestEnv t => Lens' t FinalCatalogSource
lModuledir :: HasTestEnv t => Lens' t FilePathSource
lPuppetdir :: HasTestEnv t => Lens' t FilePathSource
:: String | The test description (the thing that goes after should) |
-> Text | Resource type |
-> Text | Resource name |
-> (Resource -> Expectation) | Testing function |
-> PSpec |
Run tests on a specific resource
:: Text | The parameter name |
-> Resource | The resource to test |
-> (PValue -> Expectation) | Testing function |
-> Expectation |
Tests a specific parameter
:: [(Text, PValue)] | The parameter names and values |
-> Resource | The resource to test |
-> Expectation |
Test a serie of parameters
:: String | Test description (the thing that goes after should) |
-> Text | The file path |
-> (Text -> Expectation) | Testing function |
-> PSpec |