Safe Haskell | None |
---|
Unittests for ganeti-htools.
- genNode :: Maybe Int -> Maybe Int -> Gen Node
- genOnlineNode :: Gen Node
- genEmptyOnlineNode :: Gen Node
- genExclStorNode :: Gen Node
- genMaybeExclStorNode :: Gen Node
- genNodeList :: Gen Node -> Gen List
- genUniqueNodeList :: Gen Node -> Gen (List, NameAssoc)
- genNodeGraph :: Gen (Maybe Graph, List, List)
- prop_setAlias :: Node -> String -> Bool
- prop_setOffline :: Node -> Bool -> Property
- prop_setXmem :: Node -> Int -> Property
- prop_setMcpu :: Node -> Double -> Property
- prop_addPri_NoN1Fail :: Property
- prop_addPriFM :: Node -> Instance -> Property
- prop_addPriFD :: Instance -> Property
- hasInstTooManySpindles :: Instance -> Int -> Bool
- prop_addPriFS :: Instance -> Property
- prop_addPriFC :: Property
- prop_addSec :: Node -> Instance -> Int -> Property
- prop_addOfflinePri :: NonNegative Int -> NonNegative Int -> Property
- prop_addOfflineSec :: NonNegative Int -> NonNegative Int -> Ndx -> Property
- prop_rMem :: Instance -> Property
- prop_setMdsk :: Node -> SmallRatio -> Bool
- prop_tagMaps_idempotent :: Property
- prop_tagMaps_reject :: Property
- prop_showField :: Node -> Property
- prop_computeGroups :: [Node] -> Bool
- prop_addPri_idempotent :: Property
- prop_addSec_idempotent :: Property
- case_emptyNodeList :: Assertion
- prop_numVertices :: Property
- prop_numEdges :: Property
- prop_nodeGraphIsColorable :: Property
- prop_instanceIsEdge :: Property
- prop_edgeIsInstance :: Property
- testHTools_Node :: Test
Arbitrary instances
:: Maybe Int | Minimum node size in terms of units |
-> Maybe Int | Maximum node size (when Nothing, bounded just by the max... constants) |
-> Gen Node |
Generates an arbitrary node based on sizing information.
genOnlineNode :: Gen NodeSource
Helper function to generate a sane node.
genEmptyOnlineNode :: Gen NodeSource
Helper function to generate a sane empty node with consistent internal data.
genExclStorNode :: Gen NodeSource
genMaybeExclStorNode :: Gen NodeSource
genNodeList :: Gen Node -> Gen ListSource
Node list generator. Given a node generator, create a random length node list. Note that real clusters always have at least one node, so we don't generate empty node lists here.
genUniqueNodeList :: Gen Node -> Gen (List, NameAssoc)Source
Node list generator where node names are unique
genNodeGraph :: Gen (Maybe Graph, List, List)Source
Test cases
prop_setAlias :: Node -> String -> BoolSource
prop_setOffline :: Node -> Bool -> PropertySource
prop_setXmem :: Node -> Int -> PropertySource
prop_setMcpu :: Node -> Double -> PropertySource
prop_addPri_NoN1Fail :: PropertySource
prop_addPriFM :: Node -> Instance -> PropertySource
prop_addPriFD :: Instance -> PropertySource
hasInstTooManySpindles :: Instance -> Int -> BoolSource
prop_addPriFS :: Instance -> PropertySource
prop_addPriFC :: PropertySource
prop_addSec :: Node -> Instance -> Int -> PropertySource
prop_addOfflinePri :: NonNegative Int -> NonNegative Int -> PropertySource
prop_addOfflineSec :: NonNegative Int -> NonNegative Int -> Ndx -> PropertySource
prop_setMdsk :: Node -> SmallRatio -> BoolSource
prop_tagMaps_idempotent :: PropertySource
prop_tagMaps_reject :: PropertySource
prop_showField :: Node -> PropertySource
prop_computeGroups :: [Node] -> BoolSource
prop_addPri_idempotent :: PropertySource
prop_addSec_idempotent :: PropertySource
case_emptyNodeList :: AssertionSource
prop_numVertices :: PropertySource
prop_numEdges :: PropertySource
prop_nodeGraphIsColorable :: PropertySource
prop_instanceIsEdge :: PropertySource
prop_edgeIsInstance :: PropertySource
testHTools_Node :: TestSource
List of tests for the Node module.