ganeti

Safe HaskellNone

Test.Ganeti.HTools.Instance

Contents

Description

Unittests for ganeti-htools.

Synopsis

Arbitrary instances

genInstanceSmallerThan :: Int -> Int -> Int -> Gen InstanceSource

Generates a random instance with maximum diskmemcpu values.

genInstanceSmallerThanNode :: Node -> Gen InstanceSource

Generates an instance smaller than a node.

genInstanceMaybeBiggerThanNode :: Node -> Gen InstanceSource

Generates an instance possibly bigger than a node.

genInstanceOnNodeList :: List -> Gen InstanceSource

Generates an instance with nodes on a node list. The following rules are respected: 1. The instance is never bigger than its primary node 2. If possible the instance has different pnode and snode 3. Else disk templates which require secondary nodes are disabled

genInstanceList :: Gen Instance -> Gen ListSource

Generates an instance list given an instance generator.

Test cases

prop_creat :: Instance -> PropertySource

prop_setIdx :: Instance -> Idx -> PropertySource

prop_setName :: Instance -> String -> BoolSource

prop_setAlias :: Instance -> String -> BoolSource

prop_setPri :: Instance -> Ndx -> PropertySource

prop_setSec :: Instance -> Ndx -> PropertySource

prop_setMovable :: Instance -> Bool -> PropertySource