Revision 3bdbe4b3 htest/Test/Ganeti/Jobs.hs
b/htest/Test/Ganeti/Jobs.hs | ||
---|---|---|
1 |
{-# LANGUAGE TemplateHaskell #-} |
|
2 |
{-# OPTIONS_GHC -fno-warn-orphans #-} |
|
3 |
|
|
4 | 1 |
{-| Unittests for ganeti-htools. |
5 | 2 |
|
6 | 3 |
-} |
... | ... | |
28 | 25 |
|
29 | 26 |
module Test.Ganeti.Jobs (testJobs) where |
30 | 27 |
|
31 |
import Test.QuickCheck |
|
32 |
|
|
33 | 28 |
import Test.Ganeti.TestHelper |
34 |
import Test.Ganeti.TestCommon |
|
35 |
|
|
36 |
import qualified Ganeti.Jobs as Jobs |
|
37 |
|
|
38 |
-- * Arbitrary instances |
|
39 |
|
|
40 |
$(genArbitrary ''Jobs.OpStatus) |
|
41 |
|
|
42 |
$(genArbitrary ''Jobs.JobStatus) |
|
43 |
|
|
44 |
-- * Test cases |
|
45 |
|
|
46 |
-- | Check that (queued) job\/opcode status serialization is idempotent. |
|
47 |
prop_OpStatus_serialization :: Jobs.OpStatus -> Property |
|
48 |
prop_OpStatus_serialization = testSerialisation |
|
49 |
|
|
50 |
prop_JobStatus_serialization :: Jobs.JobStatus -> Property |
|
51 |
prop_JobStatus_serialization = testSerialisation |
|
52 | 29 |
|
53 | 30 |
testSuite "Jobs" |
54 |
[ 'prop_OpStatus_serialization |
|
55 |
, 'prop_JobStatus_serialization |
|
31 |
[ |
|
56 | 32 |
] |
Also available in: Unified diff