ganeti

Safe HaskellNone

Test.Ganeti.Objects

Contents

Description

Unittests for ganeti-htools.

Synopsis

Arbitrary instances

genInstWithNets :: [String] -> Gen InstanceSource

Generates an instance that is connected to the given networks and possibly some other networks

genInst :: Gen InstanceSource

Generates an instance that is connected to some networks

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.

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_ip4AddressToNumber :: Word32 -> PropertySource

mkLIDPlain :: String -> String -> DiskLogicalIdSource