Safe Haskell | None |
---|
Unittests for Types
.
Synopsis
- allDiskTemplates :: [DiskTemplate]
- allStorageTypes :: [StorageType]
- genReasonElem :: Gen ReasonElem
- genReasonTrail :: Gen ReasonTrail
- prop_AllocPolicy_serialisation :: AllocPolicy -> Property
- case_AllocPolicy_order :: Assertion
- prop_DiskTemplate_serialisation :: DiskTemplate -> Property
- prop_InstanceStatus_serialisation :: InstanceStatus -> Property
- prop_NonNeg_pass :: NonNegative Int -> Property
- prop_NonNeg_fail :: Positive Int -> Property
- prop_Positive_pass :: Positive Int -> Property
- prop_Positive_fail :: NonNegative Int -> Property
- prop_Neg_pass :: Positive Int -> Property
- prop_Neg_fail :: NonNegative Int -> Property
- prop_NonEmpty_pass :: NonEmptyList String -> Property
- case_NonEmpty_fail :: Assertion
- prop_MigrationMode_serialisation :: MigrationMode -> Property
- prop_VerifyOptionalChecks_serialisation :: VerifyOptionalChecks -> Property
- prop_DdmSimple_serialisation :: DdmSimple -> Property
- prop_DdmFull_serialisation :: DdmFull -> Property
- prop_CVErrorCode_serialisation :: CVErrorCode -> Property
- case_CVErrorCode_pyequiv :: Assertion
- prop_Hypervisor_serialisation :: Hypervisor -> Property
- prop_OobCommand_serialisation :: OobCommand -> Property
- prop_StorageType_serialisation :: StorageType -> Property
- prop_NodeEvacMode_serialisation :: EvacMode -> Property
- prop_FileDriver_serialisation :: FileDriver -> Property
- prop_InstCreateMode_serialisation :: InstCreateMode -> Property
- prop_RebootType_serialisation :: RebootType -> Property
- prop_ExportMode_serialisation :: ExportMode -> Property
- prop_IAllocatorTestDir_serialisation :: IAllocatorTestDir -> Property
- prop_IAllocatorMode_serialisation :: IAllocatorMode -> Property
- case_IAllocatorMode_pyequiv :: Assertion
- prop_NICMode_serialisation :: NICMode -> Property
- prop_OpStatus_serialization :: OpStatus -> Property
- prop_JobStatus_serialization :: JobStatus -> Property
- case_JobStatus_order :: Assertion
- case_NICMode_pyequiv :: Assertion
- prop_FinalizedJobStatus_serialisation :: FinalizedJobStatus -> Property
- case_FinalizedJobStatus_pyequiv :: Assertion
- prop_JobId_serialisation :: JobId -> Property
- prop_JobId_fractional :: Property
- case_JobId_BadTypes :: Assertion
- prop_JobDependency_serialisation :: JobDependency -> Property
- prop_OpSubmitPriority_serialisation :: OpSubmitPriority -> Property
- prop_OpSubmitPriority_string :: OpSubmitPriority -> Property
- prop_ELogType_serialisation :: ELogType -> Property
- testTypes :: Test
Arbitrary instance
allDiskTemplates :: [DiskTemplate] Source #
Valid disk templates (depending on configure options).
allStorageTypes :: [StorageType] Source #
Valid storage types.
genReasonElem :: Gen ReasonElem Source #
Generates one element of a reason trail
genReasonTrail :: Gen ReasonTrail Source #
Generates a reason trail
Properties
prop_AllocPolicy_serialisation :: AllocPolicy -> Property Source #
case_AllocPolicy_order :: Assertion Source #
Test AllocPolicy
ordering is as expected.
prop_DiskTemplate_serialisation :: DiskTemplate -> Property Source #
prop_InstanceStatus_serialisation :: InstanceStatus -> Property Source #
prop_NonNeg_pass :: NonNegative Int -> Property Source #
Tests building non-negative numbers.
prop_NonNeg_fail :: Positive Int -> Property Source #
Tests building non-negative numbers.
prop_Positive_pass :: Positive Int -> Property Source #
Tests building positive numbers.
prop_Positive_fail :: NonNegative Int -> Property Source #
Tests building positive numbers.
prop_Neg_pass :: Positive Int -> Property Source #
Tests building negative numbers.
prop_Neg_fail :: NonNegative Int -> Property Source #
Tests building negative numbers.
prop_NonEmpty_pass :: NonEmptyList String -> Property Source #
Tests building non-empty lists.
case_NonEmpty_fail :: Assertion Source #
Tests building positive numbers.
prop_MigrationMode_serialisation :: MigrationMode -> Property Source #
Tests migration mode serialisation.
prop_VerifyOptionalChecks_serialisation :: VerifyOptionalChecks -> Property Source #
Tests verify optional checks serialisation.
prop_DdmSimple_serialisation :: DdmSimple -> Property Source #
Tests DdmSimple
serialisation.
prop_DdmFull_serialisation :: DdmFull -> Property Source #
Tests DdmFull
serialisation.
prop_CVErrorCode_serialisation :: CVErrorCode -> Property Source #
Tests CVErrorCode
serialisation.
case_CVErrorCode_pyequiv :: Assertion Source #
Tests equivalence with Python, based on Constants.hs code.
prop_Hypervisor_serialisation :: Hypervisor -> Property Source #
Test Hypervisor
serialisation.
prop_OobCommand_serialisation :: OobCommand -> Property Source #
Test OobCommand
serialisation.
prop_StorageType_serialisation :: StorageType -> Property Source #
Test StorageType
serialisation.
prop_NodeEvacMode_serialisation :: EvacMode -> Property Source #
Test NodeEvacMode
serialisation.
prop_FileDriver_serialisation :: FileDriver -> Property Source #
Test FileDriver
serialisation.
prop_InstCreateMode_serialisation :: InstCreateMode -> Property Source #
Test InstCreate
serialisation.
prop_RebootType_serialisation :: RebootType -> Property Source #
Test RebootType
serialisation.
prop_ExportMode_serialisation :: ExportMode -> Property Source #
Test ExportMode
serialisation.
prop_IAllocatorTestDir_serialisation :: IAllocatorTestDir -> Property Source #
Test IAllocatorTestDir
serialisation.
prop_IAllocatorMode_serialisation :: IAllocatorMode -> Property Source #
Test IAllocatorMode
serialisation.
case_IAllocatorMode_pyequiv :: Assertion Source #
Tests equivalence with Python, based on Constants.hs code.
prop_NICMode_serialisation :: NICMode -> Property Source #
Test NICMode
serialisation.
prop_OpStatus_serialization :: OpStatus -> Property Source #
Test OpStatus
serialisation.
prop_JobStatus_serialization :: JobStatus -> Property Source #
Test JobStatus
serialisation.
case_JobStatus_order :: Assertion Source #
Test JobStatus
ordering is as expected.
case_NICMode_pyequiv :: Assertion Source #
Tests equivalence with Python, based on Constants.hs code.
prop_FinalizedJobStatus_serialisation :: FinalizedJobStatus -> Property Source #
Test FinalizedJobStatus
serialisation.
case_FinalizedJobStatus_pyequiv :: Assertion Source #
Tests equivalence with Python, based on Constants.hs code.
prop_JobId_serialisation :: JobId -> Property Source #
Tests JobId serialisation (both from string and ints).
prop_JobId_fractional :: Property Source #
Tests that fractional job IDs are not accepted.
case_JobId_BadTypes :: Assertion Source #
Tests that a job ID is not parseable from "bad" JSON values.
prop_JobDependency_serialisation :: JobDependency -> Property Source #
Test JobDependency
serialisation.
prop_OpSubmitPriority_serialisation :: OpSubmitPriority -> Property Source #
Test OpSubmitPriority
serialisation.
prop_OpSubmitPriority_string :: OpSubmitPriority -> Property Source #
Tests string formatting for OpSubmitPriority
.
prop_ELogType_serialisation :: ELogType -> Property Source #
Test ELogType
serialisation.