ganeti

Safe HaskellNone

Test.Ganeti.HTools.Node

Contents

Description

Unittests for ganeti-htools.

Synopsis

Arbitrary instances

genNodeSource

Arguments

:: 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.

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_setFmemGreater :: Node -> Int -> PropertySource

prop_addSec :: Node -> Instance -> Int -> PropertySource

prop_addOfflinePri :: NonNegative Int -> NonNegative Int -> PropertySource

prop_addOfflineSec :: NonNegative Int -> NonNegative Int -> Ndx -> PropertySource

prop_rMem :: Instance -> PropertySource

prop_showField :: Node -> PropertySource

testHTools_Node :: TestSource

List of tests for the Node module.