Revision 9d929656
b/test/hs/Test/Ganeti/JQueue.hs | ||
---|---|---|
170 | 170 |
let hs_sp = (jobStatusToRaw $ calcJobStatus job, |
171 | 171 |
calcJobPriority job) |
172 | 172 |
in assertEqual ("Different result after encoding/decoding for " ++ |
173 |
show job) py_sp hs_sp
|
|
173 |
show job) hs_sp py_sp
|
|
174 | 174 |
) $ zip decoded jobs |
175 | 175 |
|
176 | 176 |
-- | Tests listing of Job ids. |
b/test/hs/Test/Ganeti/Objects.hs | ||
---|---|---|
396 | 396 |
HUnit.assertEqual "Mismatch in number of returned networks" |
397 | 397 |
(length decoded) (length networks_with_properties) |
398 | 398 |
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding") |
399 |
) $ zip decoded networks_with_properties
|
|
399 |
) $ zip networks_with_properties decoded
|
|
400 | 400 |
|
401 | 401 |
-- | Creates a tuple of the given network combined with some of its properties |
402 | 402 |
-- to be compared against the same properties generated by the python code. |
... | ... | |
439 | 439 |
HUnit.assertEqual "Mismatch in number of returned node groups" |
440 | 440 |
(length decoded) (length groups) |
441 | 441 |
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding") |
442 |
) $ zip decoded groups
|
|
442 |
) $ zip groups decoded
|
|
443 | 443 |
|
444 | 444 |
-- | Generates a node group with up to 3 networks. |
445 | 445 |
-- | FIXME: This generates still somewhat completely random data, without normal |
... | ... | |
533 | 533 |
HUnit.assertEqual "Mismatch in number of returned instances" |
534 | 534 |
(length decoded) (length instances) |
535 | 535 |
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding") |
536 |
) $ zip decoded instances
|
|
536 |
) $ zip instances decoded
|
|
537 | 537 |
|
538 | 538 |
-- | Tests that the logical ID is correctly found in a plain disk |
539 | 539 |
caseIncludeLogicalIdPlain :: HUnit.Assertion |
b/test/hs/Test/Ganeti/OpCodes.hs | ||
---|---|---|
523 | 523 |
HUnit.assertEqual "Mismatch in number of returned opcodes" |
524 | 524 |
(length decoded) (length with_sum) |
525 | 525 |
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding") |
526 |
) $ zip decoded with_sum
|
|
526 |
) $ zip with_sum decoded
|
|
527 | 527 |
|
528 | 528 |
-- | Custom HUnit test case that forks a Python process and checks |
529 | 529 |
-- correspondence between Haskell OpCodes fields and their Python |
... | ... | |
556 | 556 |
HUnit.assertEqual "Mismatch in OP_ID" py_id hs_id |
557 | 557 |
HUnit.assertEqual ("Mismatch in fields for " ++ hs_id) |
558 | 558 |
py_flds hs_flds |
559 |
) $ zip py_fields hs_fields
|
|
559 |
) $ zip hs_fields py_fields
|
|
560 | 560 |
|
561 | 561 |
-- | Checks that setOpComment works correctly. |
562 | 562 |
prop_setOpComment :: OpCodes.MetaOpCode -> String -> Property |
b/test/hs/Test/Ganeti/Runtime.hs | ||
---|---|---|
64 | 64 |
assertEqual "Mismatch in number of returned log files" |
65 | 65 |
(length decoded) (length daemons) |
66 | 66 |
mapM_ (uncurry (assertEqual "Different result after encoding/decoding") |
67 |
) $ zip decoded dfiles
|
|
67 |
) $ zip dfiles decoded
|
|
68 | 68 |
|
69 | 69 |
-- | Tests the compatibility between Haskell and Python users. |
70 | 70 |
case_UsersGroups :: Assertion |
... | ... | |
116 | 116 |
assertEqual "Mismatch in number of returned users" |
117 | 117 |
(length py_groups) (length groups) |
118 | 118 |
mapM_ (uncurry (assertEqual "Different result for users") |
119 |
) $ zip py_users users
|
|
119 |
) $ zip users py_users
|
|
120 | 120 |
mapM_ (uncurry (assertEqual "Different result for groups") |
121 |
) $ zip py_groups groups
|
|
121 |
) $ zip groups py_groups
|
|
122 | 122 |
|
123 | 123 |
testSuite "Runtime" |
124 | 124 |
[ 'case_LogFiles |
Also available in: Unified diff