Safe Haskell | None |
---|
Unittests for ganeti-htools.
Synopsis
- genStorageUnit :: Gen StorageUnit
- genStorageUnits :: Gen [StorageUnit]
- genHvParams :: Gen HvParams
- genHvSpecs :: Gen [(Hypervisor, HvParams)]
- genConsoleInfoCallParams :: Gen [(String, InstanceConsoleInfoParams)]
- genInstanceConsoleInfoParams :: Gen InstanceConsoleInfoParams
- runOfflineTest :: (Rpc a b, Eq b, Show b) => a -> Property
- prop_noffl_request_allinstinfo :: RpcCallAllInstancesInfo -> Property
- prop_noffl_request_instconsinfo :: RpcCallInstanceConsoleInfo -> Property
- prop_noffl_request_instlist :: RpcCallInstanceList -> Property
- prop_noffl_request_nodeinfo :: RpcCallNodeInfo -> Property
- prop_Compressed_serialisation :: Compressed -> Property
- testRpc :: Test
Documentation
genStorageUnit :: Gen StorageUnit Source #
genStorageUnits :: Gen [StorageUnit] Source #
genHvParams :: Gen HvParams Source #
Generate Hvparams
genHvSpecs :: Gen [(Hypervisor, HvParams)] Source #
Generate hypervisor specifications to be used for the NodeInfo call
genConsoleInfoCallParams :: Gen [(String, InstanceConsoleInfoParams)] Source #
Generates per-instance console info params for the InstanceConsoleInfo
call.
genInstanceConsoleInfoParams :: Gen InstanceConsoleInfoParams Source #
Generates parameters for the console info call, consisting of an instance
object, node object, HvParams
, and FilledBeParams
.
runOfflineTest :: (Rpc a b, Eq b, Show b) => a -> Property Source #
Monadic check that, for an offline node and a call that does not support offline nodes, we get a OfflineNodeError response.
prop_noffl_request_allinstinfo :: RpcCallAllInstancesInfo -> Property Source #
prop_noffl_request_instconsinfo :: RpcCallInstanceConsoleInfo -> Property Source #
prop_noffl_request_instlist :: RpcCallInstanceList -> Property Source #
prop_noffl_request_nodeinfo :: RpcCallNodeInfo -> Property Source #
prop_Compressed_serialisation :: Compressed -> Property Source #
Test that the serialisation of Compressed
is idempotent.
Orphan instances
Arbitrary Compressed # | |
arbitrary :: Gen Compressed shrink :: Compressed -> [Compressed] | |
Arbitrary RpcCallAllInstancesInfo # | |
Arbitrary RpcCallInstanceConsoleInfo # | |
Arbitrary RpcCallInstanceList # | |
arbitrary :: Gen RpcCallInstanceList | |
Arbitrary RpcCallNodeInfo # | |
arbitrary :: Gen RpcCallNodeInfo shrink :: RpcCallNodeInfo -> [RpcCallNodeInfo] |