Revision 22381768 htest/Test/Ganeti/Types.hs

b/htest/Test/Ganeti/Types.hs
32 32
  , DiskTemplate(..)
33 33
  , InstanceStatus(..)
34 34
  , NonEmpty(..)
35
  , Hypervisor(..)
35 36
  ) where
36 37

  
37 38
import Data.List (sort)
......
69 70

  
70 71
$(genArbitrary ''CVErrorCode)
71 72

  
73
$(genArbitrary ''Hypervisor)
74

  
72 75
instance (Arbitrary a) => Arbitrary (Types.NonEmpty a) where
73 76
  arbitrary = do
74 77
    QuickCheck.NonEmpty lst <- arbitrary
......
151 154
      all_hs_codes = sort $ map Types.cVErrorCodeToRaw [minBound..maxBound]
152 155
  assertEqual "for CVErrorCode equivalence" all_py_codes all_hs_codes
153 156

  
157
-- | Test 'Hypervisor' serialisation.
158
prop_Hypervisor_serialisation :: Hypervisor -> Property
159
prop_Hypervisor_serialisation = testSerialisation
160

  
154 161
testSuite "Types"
155 162
  [ 'prop_AllocPolicy_serialisation
156 163
  , 'prop_DiskTemplate_serialisation
......
166 173
  , 'prop_DdmSimple_serialisation
167 174
  , 'prop_CVErrorCode_serialisation
168 175
  , 'case_CVErrorCode_pyequiv
176
  , 'prop_Hypervisor_serialisation
169 177
  ]

Also available in: Unified diff