Revision b46ba79c htest/Test/Ganeti/Types.hs

b/htest/Test/Ganeti/Types.hs
47 47
import Ganeti.BasicTypes
48 48
import qualified Ganeti.Constants as C
49 49
import Ganeti.Types as Types
50
import Ganeti.Luxi as Luxi
51 50

  
52 51
{-# ANN module "HLint: ignore Use camelCase" #-}
53 52

  
......
118 117

  
119 118
$(genArbitrary ''FinalizedJobStatus)
120 119

  
121
instance Arbitrary Luxi.JobId where
120
instance Arbitrary JobId where
122 121
  arbitrary = do
123 122
    (Positive i) <- arbitrary
124
    Luxi.makeJobId i
123
    makeJobId i
124

  
125
$(genArbitrary ''JobIdDep)
126

  
127
$(genArbitrary ''JobDependency)
128

  
129
$(genArbitrary ''OpSubmitPriority)
125 130

  
126 131
-- * Properties
127 132

  
......
307 312
  testSerialisation jid .&&.
308 313
  (J.readJSON . J.showJSON . show $ fromJobId jid) ==? J.Ok jid
309 314

  
315
-- | Test 'JobDependency' serialisation.
316
prop_JobDependency_serialisation :: JobDependency -> Property
317
prop_JobDependency_serialisation = testSerialisation
318

  
319
-- | Test 'OpSubmitPriority' serialisation.
320
prop_OpSubmitPriority_serialisation :: OpSubmitPriority -> Property
321
prop_OpSubmitPriority_serialisation = testSerialisation
322

  
310 323
testSuite "Types"
311 324
  [ 'prop_AllocPolicy_serialisation
312 325
  , 'prop_DiskTemplate_serialisation
......
343 356
  , 'prop_FinalizedJobStatus_serialisation
344 357
  , 'case_FinalizedJobStatus_pyequiv
345 358
  , 'prop_JobId_serialisation
359
  , 'prop_JobDependency_serialisation
360
  , 'prop_OpSubmitPriority_serialisation
346 361
  ]

Also available in: Unified diff