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 AddressPool
- genBitStringMaxLen :: Int -> Gen AddressPool
- genEmptyCluster :: Int -> Gen ConfigData
- genConfigDataWithNetworks :: ConfigData -> Gen ConfigData
- prop_fillDict :: [(Int, Int)] -> [(Int, Int)] -> Property
- prop_LogicalVolume_serialisation :: LogicalVolume -> Property
- prop_LogicalVolume_deserialisationFail :: Property
- prop_Disk_serialisation :: Disk -> Property
- prop_Disk_array_serialisation :: Disk -> Property
- prop_Node_serialisation :: Node -> Property
- prop_Inst_serialisation :: Instance -> Property
- prop_AddressPool_serialisation :: AddressPool -> Property
- prop_Network_serialisation :: Network -> Property
- prop_FilterAction_serialisation :: FilterAction -> Property
- prop_FilterPredicate_serialisation :: FilterPredicate -> Property
- prop_Config_serialisation :: Property
- casePyCompatNetworks :: Assertion
- getNetworkProperties :: Network -> (Int, Int, Network)
- casePyCompatNodegroups :: Assertion
- genNodeGroup :: Gen NodeGroup
- prop_ip4AddressAsNum :: Ip4Address -> Property
- prop_ip4AddressToNumber :: Word32 -> Property
- caseNextIp4Address :: Assertion
- casePyCompatInstances :: Assertion
- mkLIDPlain :: String -> String -> DiskLogicalId
- 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 AddressPoolSource
genBitStringMaxLen :: Int -> Gen AddressPoolSource
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_LogicalVolume_serialisation :: LogicalVolume -> PropertySource
prop_LogicalVolume_deserialisationFail :: PropertySource
prop_Disk_serialisation :: Disk -> PropertySource
prop_Disk_array_serialisation :: Disk -> PropertySource
prop_Node_serialisation :: Node -> PropertySource
prop_Inst_serialisation :: Instance -> PropertySource
prop_AddressPool_serialisation :: AddressPool -> PropertySource
prop_Network_serialisation :: Network -> PropertySource
prop_FilterAction_serialisation :: FilterAction -> PropertySource
prop_FilterPredicate_serialisation :: FilterPredicate -> PropertySource
prop_Config_serialisation :: PropertySource
casePyCompatNetworks :: AssertionSource
getNetworkProperties :: Network -> (Int, Int, Network)Source
casePyCompatNodegroups :: AssertionSource
genNodeGroup :: Gen NodeGroupSource
prop_ip4AddressAsNum :: Ip4Address -> PropertySource
prop_ip4AddressToNumber :: Word32 -> PropertySource
caseNextIp4Address :: AssertionSource
casePyCompatInstances :: AssertionSource
mkLIDPlain :: String -> String -> DiskLogicalIdSource
caseIncludeLogicalIdPlain :: AssertionSource
caseIncludeLogicalIdDrbd :: AssertionSource
caseNotIncludeLogicalIdPlain :: AssertionSource
testObjects :: TestSource