Safe Haskell | None |
---|
Unittests for ganeti-htools.
- genValidNetwork :: Gen Network
- genBitString :: Int -> Gen String
- genBitStringMaxLen :: Int -> Gen String
- genEmptyCluster :: Int -> Gen ConfigData
- prop_fillDict :: [(Int, Int)] -> [(Int, Int)] -> Property
- prop_Disk_serialisation :: Disk -> Property
- prop_Node_serialisation :: Node -> Property
- prop_Inst_serialisation :: Instance -> Property
- prop_Network_serialisation :: Network -> Property
- prop_Config_serialisation :: Property
- case_py_compat_networks :: Assertion
- getNetworkProperties :: Network -> (Int, Int, Network)
- case_py_compat_nodegroups :: Assertion
- genNodeGroup :: Gen NodeGroup
- testObjects :: Test
Arbitrary instances
genValidNetwork :: Gen NetworkSource
Generates a network instance with minimum netmasks of /24. Generating bigger networks slows down the tests, because long bit strings are generated for the reservations.
genBitString :: Int -> Gen StringSource
genBitStringMaxLen :: Int -> Gen StringSource
Generate an arbitrary string consisting of '0' and '1' of the maximum given length.
genEmptyCluster :: Int -> Gen ConfigDataSource
Generator for config data with an empty cluster (no instances), with N defined nodes.
Test properties
prop_fillDict :: [(Int, Int)] -> [(Int, Int)] -> PropertySource
prop_Disk_serialisation :: Disk -> PropertySource
prop_Node_serialisation :: Node -> PropertySource
prop_Inst_serialisation :: Instance -> PropertySource
prop_Network_serialisation :: Network -> PropertySource
prop_Config_serialisation :: PropertySource
case_py_compat_networks :: AssertionSource
getNetworkProperties :: Network -> (Int, Int, Network)Source
case_py_compat_nodegroups :: AssertionSource
genNodeGroup :: Gen NodeGroupSource
testObjects :: TestSource