Safe Haskell | None |
---|
Unittests for ganeti-htools.
Synopsis
- genBiggerISpec :: ISpec -> Gen ISpec
- genMinMaxISpecs :: Gen MinMaxISpecs
- genMinMaxStdISpecs :: Gen (MinMaxISpecs, ISpec)
- genIPolicySpecs :: Gen ([MinMaxISpecs], ISpec)
- prop_ISpec_serialisation :: ISpec -> Property
- prop_IPolicy_serialisation :: IPolicy -> Property
- prop_opToResult :: OpResult Int -> Property
- prop_eitherToResult :: Either String Int -> Bool
- case_AutoRepairType_sort :: Assertion
- case_AutoRepairResult_pyequiv :: Assertion
- testHTools_Types :: Test
Helpers
Arbitrary instance
genBiggerISpec :: ISpec -> Gen ISpec Source #
Generates an ispec bigger than the given one.
genMinMaxISpecs :: Gen MinMaxISpecs Source #
genMinMaxStdISpecs :: Gen (MinMaxISpecs, ISpec) Source #
genIPolicySpecs :: Gen ([MinMaxISpecs], ISpec) Source #
Test cases
prop_ISpec_serialisation :: ISpec -> Property Source #
prop_IPolicy_serialisation :: IPolicy -> Property Source #
prop_opToResult :: OpResult Int -> Property Source #
prop_eitherToResult :: Either String Int -> Bool Source #
case_AutoRepairType_sort :: Assertion Source #
Test AutoRepairType
ordering is as expected and consistent with Python
codebase.
case_AutoRepairResult_pyequiv :: Assertion Source #
Test AutoRepairResult
type is equivalent with Python codebase.
testHTools_Types :: Test Source #
Orphan instances
Arbitrary ISpec # | |
Arbitrary MinMaxISpecs # | |
arbitrary :: Gen MinMaxISpecs shrink :: MinMaxISpecs -> [MinMaxISpecs] | |
Arbitrary FailMode # | |
Arbitrary IPolicy # | |
Arbitrary a => Arbitrary (OpResult a) # | |