Revision 41044e04 test/hs/Test/Ganeti/HTools/Backend/Text.hs
b/test/hs/Test/Ganeti/HTools/Backend/Text.hs | ||
---|---|---|
7 | 7 |
|
8 | 8 |
{- |
9 | 9 |
|
10 |
Copyright (C) 2009, 2010, 2011, 2012 Google Inc. |
|
10 |
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
|
|
11 | 11 |
|
12 | 12 |
This program is free software; you can redistribute it and/or modify |
13 | 13 |
it under the terms of the GNU General Public License as published by |
... | ... | |
158 | 158 |
Bad msg -> failTest $ "Failed to load ispec: " ++ msg |
159 | 159 |
Ok ispec' -> ispec ==? ispec' |
160 | 160 |
|
161 |
prop_MultipleMinMaxISpecsIdempotent :: [Types.MinMaxISpecs] -> Property |
|
162 |
prop_MultipleMinMaxISpecsIdempotent minmaxes = |
|
163 |
case Text.loadMultipleMinMaxISpecs "dummy" . Utils.sepSplit ';' . |
|
164 |
Text.serializeMultipleMinMaxISpecs $ minmaxes of |
|
165 |
Bad msg -> failTest $ "Failed to load min/max ispecs: " ++ msg |
|
166 |
Ok minmaxes' -> minmaxes ==? minmaxes' |
|
167 |
|
|
161 | 168 |
prop_IPolicyIdempotent :: Types.IPolicy -> Property |
162 | 169 |
prop_IPolicyIdempotent ipol = |
163 | 170 |
case Text.loadIPolicy . Utils.sepSplit '|' $ |
... | ... | |
210 | 217 |
, 'prop_Load_NodeFail |
211 | 218 |
, 'prop_NodeLSIdempotent |
212 | 219 |
, 'prop_ISpecIdempotent |
220 |
, 'prop_MultipleMinMaxISpecsIdempotent |
|
213 | 221 |
, 'prop_IPolicyIdempotent |
214 | 222 |
, 'prop_CreateSerialise |
215 | 223 |
] |
Also available in: Unified diff