[Pkg-ganeti-devel] [ganeti] 09/165: Adjust tests for HTools to ignore too many fields
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Tue Aug 11 13:53:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch master
in repository ganeti.
commit ae8f07f58ce3c4e1d4d1dd51a2579936d48b0814
Author: Aaron Karper <akarper at google.com>
Date: Wed Jan 21 13:09:27 2015 +0100
Adjust tests for HTools to ignore too many fields
Currently the tests check that if the text backend doesn't have the
exact correct number of arguments that the parse will always fail.
Since we want the HTools protocols to be extensible, additional
fields should be ignored, not expected to give an error.
Signed-off-by: Aaron Karper <akarper at google.com>
Reviewed-by: Klaus Aehlig <aehlig at google.com>
---
test/hs/Test/Ganeti/HTools/Backend/Text.hs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/hs/Test/Ganeti/HTools/Backend/Text.hs b/test/hs/Test/Ganeti/HTools/Backend/Text.hs
index bf3809d..fba46d0 100644
--- a/test/hs/Test/Ganeti/HTools/Backend/Text.hs
+++ b/test/hs/Test/Ganeti/HTools/Backend/Text.hs
@@ -110,7 +110,7 @@ prop_Load_Instance name mem dsk vcpus status
prop_Load_InstanceFail :: [(String, Int)] -> [String] -> Property
prop_Load_InstanceFail ktn fields =
- length fields < 10 || length fields > 13 ==>
+ length fields < 10 ==>
case Text.loadInst nl fields of
Ok _ -> failTest "Managed to load instance from invalid data"
Bad msg -> counterexample ("Unrecognised error message: " ++ msg) $
@@ -163,7 +163,8 @@ prop_Load_Node name tm nm fm td fd tc fo =
prop_Load_NodeFail :: [String] -> Property
prop_Load_NodeFail fields =
- length fields /= 8 ==> isNothing $ Text.loadNode Map.empty fields
+ length fields < 8 ==> isNothing $ Text.loadNode Map.empty fields
+
prop_NodeLSIdempotent :: Property
prop_NodeLSIdempotent =
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git
More information about the Pkg-ganeti-devel
mailing list