ganeti

Safe HaskellNone

Test.Ganeti.Objects

Contents

Description

Unittests for ganeti-htools.

Synopsis

Arbitrary instances

genInstWithNets :: [String] -> Gen Instance Source #

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

genInst :: Gen Instance Source #

Generates an instance that is connected to some networks

genValidNetwork :: Gen Network Source #

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 AddressPool Source #

Generate an arbitrary string consisting of '0' and '1' of the maximum given length.

genEmptyCluster :: Int -> Gen ConfigData Source #

Generator for config data with an empty cluster (no instances), with N defined nodes.

genConfigDataWithNetworks :: ConfigData -> Gen ConfigData Source #

FIXME: make an even simpler base version of creating a cluster.

Generates config data with a couple of networks.

Test properties

Orphan instances

IsString Ip4Address #

IsString instance for Ip4Address, to help write the tests.

Instance details

Methods

fromString :: String -> Ip4Address

Arbitrary ByteString # 
Instance details

Methods

arbitrary :: Gen ByteString

shrink :: ByteString -> [ByteString]

Arbitrary DiskMode # 
Instance details

Arbitrary BlockDriver # 
Instance details

Arbitrary AdminState # 
Instance details

Arbitrary AdminStateSource # 
Instance details

Arbitrary SshKeyType # 
Instance details

Arbitrary OsParams # 
Instance details

Arbitrary PartialNicParams # 
Instance details

Arbitrary FilledNicParams # 
Instance details

Arbitrary PartialNic # 
Instance details

Arbitrary PartialBeParams # 
Instance details

Arbitrary FilledBeParams # 
Instance details

Arbitrary Instance # 
Instance details

Arbitrary ForthcomingInstanceData # 
Instance details

Arbitrary RealInstanceData # 
Instance details

Arbitrary DiskLogicalId # 
Instance details

Arbitrary LogicalVolume # 
Instance details

Arbitrary Disk #

Disk arbitrary instance. Since we don't test disk hierarchy properties, we only generate disks with no children (FIXME), as generating recursive datastructures is a bit more work.

Instance details

Methods

arbitrary :: Gen Disk

shrink :: Disk -> [Disk]

Arbitrary AddressPool # 
Instance details

Arbitrary Ip4Network # 
Instance details

Arbitrary Ip4Address # 
Instance details

Arbitrary Network # 
Instance details

Methods

arbitrary :: Gen Network

shrink :: Network -> [Network]

Arbitrary PartialISpecParams #

FIXME: This generates completely random data, without normal validation rules.

Instance details

Arbitrary FilledISpecParams # 
Instance details

Arbitrary MinMaxISpecs # 
Instance details

Arbitrary PartialIPolicy #

FIXME: This generates completely random data, without normal validation rules.

Instance details

Arbitrary FilledIPolicy # 
Instance details

Arbitrary PartialNDParams # 
Instance details

Arbitrary FilledNDParams # 
Instance details

Arbitrary GroupDiskParams #

No real arbitrary instance for GroupDiskParams yet.

Instance details

Arbitrary Node # 
Instance details

Methods

arbitrary :: Gen Node

shrink :: Node -> [Node]

Arbitrary FilterPredicate # 
Instance details

Arbitrary FilterAction # 
Instance details

Arbitrary NodeGroup # 
Instance details

Arbitrary FilterRule # 
Instance details

Arbitrary IpFamily # 
Instance details

Arbitrary IAllocatorParams # 
Instance details

Arbitrary ClusterNicParams # 
Instance details

Arbitrary ClusterOsParamsPrivate # 
Instance details

Arbitrary ClusterOsParams # 
Instance details

Arbitrary ClusterBeParams # 
Instance details

Arbitrary OsHvParams #

No real arbitrary instance for OsHvParams yet.

Instance details

Arbitrary ClusterHvParams #

No real arbitrary instance for ClusterHvParams yet.

Instance details

Arbitrary Cluster # 
Instance details

Methods

arbitrary :: Gen Cluster

shrink :: Cluster -> [Cluster]

Arbitrary ConfigData # 
Instance details

Arbitrary (Container DataCollectorConfig) # 
Instance details

Arbitrary a => Arbitrary (Private a) # 
Instance details

Methods

arbitrary :: Gen (Private a)

shrink :: Private a -> [Private a]