ganeti-htoolsSource codeContentsIndex
Ganeti.HTools.QC
Contents
Constants
Helper functions
Arbitrary instances
Actual tests
Description
Unittests for ganeti-htools
Synopsis
maxMem :: Int
maxDsk :: Int
maxCpu :: Int
isFailure :: OpResult a -> Bool
isOk :: Result a -> Bool
isBad :: Result a -> Bool
makeSmallCluster :: Node -> Int -> List
isNodeBig :: Node -> Int -> Bool
canBalance :: Table -> Bool -> Bool -> Bool
newtype DNSChar = DNSChar {
dnsGetChar :: Char
}
getName :: Gen String
getFQDN :: Gen String
newtype SmallRatio = SmallRatio Double
Constants
maxMem :: IntSource
Maximum memory (1TiB, somewhat random value)
maxDsk :: IntSource
Maximum disk (8TiB, somewhat random value)
maxCpu :: IntSource
Max CPUs (1024, somewhat random value)
Helper functions
isFailure :: OpResult a -> BoolSource
Simple checker for whether OpResult is fail or pass
isOk :: Result a -> BoolSource
Simple checker for whether Result is fail or pass
isBad :: Result a -> BoolSource
makeSmallCluster :: Node -> Int -> ListSource

Update an instance to be smaller than a node

Create an instance given its spec

Create a small cluster by repeating a node spec

isNodeBig :: Node -> Int -> BoolSource
Checks if a node is big enough
canBalance :: Table -> Bool -> Bool -> BoolSource
Arbitrary instances
newtype DNSChar Source
Constructors
DNSChar
dnsGetChar :: Char
getName :: Gen StringSource
getFQDN :: Gen StringSource
Actual tests
newtype SmallRatio Source

Make sure add is idempotent

Make sure remove is idempotent

Make sure a missing item returns 0

Make sure an added item is found

Manual check that maxElem returns the maximum indeed, or 0 for null

Check that an instance add with too high memory or disk will be rejected

Check that an instance add with too high memory or disk will be rejected

Constructors
SmallRatio Double
Produced by Haddock version 2.6.0