Commit 9d929656 authored by Santi Raffa's avatar Santi Raffa Committed by Jose A. Lopes
Browse files

OpCodes test: fix argument order (expected/but got)



Fix expected/but got value in some unit tests.
Signed-off-by: default avatarSanti Raffa <rsanti@google.com>
Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
parent d4102e0c
......@@ -170,7 +170,7 @@ case_JobStatusPri_py_equiv = do
let hs_sp = (jobStatusToRaw $ calcJobStatus job,
calcJobPriority job)
in assertEqual ("Different result after encoding/decoding for " ++
show job) py_sp hs_sp
show job) hs_sp py_sp
) $ zip decoded jobs
-- | Tests listing of Job ids.
......
......@@ -396,7 +396,7 @@ casePyCompatNetworks = do
HUnit.assertEqual "Mismatch in number of returned networks"
(length decoded) (length networks_with_properties)
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding")
) $ zip decoded networks_with_properties
) $ zip networks_with_properties decoded
-- | Creates a tuple of the given network combined with some of its properties
-- to be compared against the same properties generated by the python code.
......@@ -439,7 +439,7 @@ casePyCompatNodegroups = do
HUnit.assertEqual "Mismatch in number of returned node groups"
(length decoded) (length groups)
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding")
) $ zip decoded groups
) $ zip groups decoded
-- | Generates a node group with up to 3 networks.
-- | FIXME: This generates still somewhat completely random data, without normal
......@@ -533,7 +533,7 @@ casePyCompatInstances = do
HUnit.assertEqual "Mismatch in number of returned instances"
(length decoded) (length instances)
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding")
) $ zip decoded instances
) $ zip instances decoded
-- | Tests that the logical ID is correctly found in a plain disk
caseIncludeLogicalIdPlain :: HUnit.Assertion
......
......@@ -523,7 +523,7 @@ case_py_compat_types = do
HUnit.assertEqual "Mismatch in number of returned opcodes"
(length decoded) (length with_sum)
mapM_ (uncurry (HUnit.assertEqual "Different result after encoding/decoding")
) $ zip decoded with_sum
) $ zip with_sum decoded
-- | Custom HUnit test case that forks a Python process and checks
-- correspondence between Haskell OpCodes fields and their Python
......@@ -556,7 +556,7 @@ case_py_compat_fields = do
HUnit.assertEqual "Mismatch in OP_ID" py_id hs_id
HUnit.assertEqual ("Mismatch in fields for " ++ hs_id)
py_flds hs_flds
) $ zip py_fields hs_fields
) $ zip hs_fields py_fields
-- | Checks that setOpComment works correctly.
prop_setOpComment :: OpCodes.MetaOpCode -> String -> Property
......
......@@ -64,7 +64,7 @@ case_LogFiles = do
assertEqual "Mismatch in number of returned log files"
(length decoded) (length daemons)
mapM_ (uncurry (assertEqual "Different result after encoding/decoding")
) $ zip decoded dfiles
) $ zip dfiles decoded
-- | Tests the compatibility between Haskell and Python users.
case_UsersGroups :: Assertion
......@@ -116,9 +116,9 @@ case_UsersGroups = do
assertEqual "Mismatch in number of returned users"
(length py_groups) (length groups)
mapM_ (uncurry (assertEqual "Different result for users")
) $ zip py_users users
) $ zip users py_users
mapM_ (uncurry (assertEqual "Different result for groups")
) $ zip py_groups groups
) $ zip groups py_groups
testSuite "Runtime"
[ 'case_LogFiles
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment