Safe Haskell | None |
---|
Unittests for ganeti-htools.
- genInstWithNets :: [String] -> Gen Instance
- genInst :: Gen Instance
- enhanceInstWithNets :: Instance -> [String] -> Gen Instance
- genDiskWithChildren :: Int -> Gen Disk
- genDisk :: Gen Disk
- genValidNetwork :: Gen Network
- genBitString :: Int -> Gen String
- genBitStringMaxLen :: Int -> Gen String
- genEmptyCluster :: Int -> Gen ConfigData
- genConfigDataWithNetworks :: ConfigData -> 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
- casePyCompatNetworks :: Assertion
- getNetworkProperties :: Network -> (Int, Int, Network)
- casePyCompatNodegroups :: Assertion
- genNodeGroup :: Gen NodeGroup
- ip4AddrValue :: Ip4Address -> Integer
- prop_nextIp4Address :: Ip4Address -> Property
- caseNextIp4Address :: Assertion
- casePyCompatInstances :: Assertion
- caseIncludeLogicalIdPlain :: Assertion
- caseIncludeLogicalIdDrbd :: Assertion
- caseNotIncludeLogicalIdPlain :: Assertion
- testObjects :: Test
Arbitrary instances
genInstWithNets :: [String] -> Gen InstanceSource
Generates an instance that is connected to the given networks and possibly some other networks
enhanceInstWithNets :: Instance -> [String] -> Gen InstanceSource
genDiskWithChildren :: Int -> Gen DiskSource
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.
genConfigDataWithNetworks :: ConfigData -> Gen ConfigDataSource
FIXME: make an even simpler base version of creating a cluster.
Generates config data with a couple of networks.
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
casePyCompatNetworks :: AssertionSource
getNetworkProperties :: Network -> (Int, Int, Network)Source
casePyCompatNodegroups :: AssertionSource
genNodeGroup :: Gen NodeGroupSource
ip4AddrValue :: Ip4Address -> IntegerSource
prop_nextIp4Address :: Ip4Address -> PropertySource
caseNextIp4Address :: AssertionSource
casePyCompatInstances :: AssertionSource
caseIncludeLogicalIdPlain :: AssertionSource
caseIncludeLogicalIdDrbd :: AssertionSource
caseNotIncludeLogicalIdPlain :: AssertionSource
testObjects :: TestSource