On Wed, Mar 7, 2012 at 10:07 PM, Iustin Pop <[email protected]> wrote: > On Wed, Mar 07, 2012 at 03:08:43PM +0000, Guido Trotter wrote: >> On Tue, Mar 6, 2012 at 11:59 PM, Iustin Pop <[email protected]> wrote: >> > Currently, this test assumes localStorageTemplates, so let's make sure >> > we enforce that on the given instance >> > --- >> > htools/Ganeti/HTools/QC.hs | 13 +++++++------ >> > 1 files changed, 7 insertions(+), 6 deletions(-) >> > >> > diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs >> > index 8c52a34..b37fe4d 100644 >> > --- a/htools/Ganeti/HTools/QC.hs >> > +++ b/htools/Ganeti/HTools/QC.hs >> > @@ -968,13 +968,14 @@ prop_Node_addPriFM node inst = >> > inst'' = inst' { Instance.mem = Instance.mem inst } >> > >> > prop_Node_addPriFD node inst = >> >> addwhat? :) Can you at least add a comment explaining this name? >> >> > + forAll (elements Instance.localStorageTemplates) $ \dt -> >> > Instance.dsk inst >= Node.fDsk node && not (Node.failN1 node) ==> >> > - case Node.addPri node inst'' of >> > - Types.OpFail Types.FailDisk -> True >> > - _ -> False >> > - where _types = (node::Node.Node, inst::Instance.Instance) >> > - inst' = setInstanceSmallerThanNode node inst >> > - inst'' = inst' { Instance.dsk = Instance.dsk inst } >> > + let inst' = setInstanceSmallerThanNode node inst >> > + inst'' = inst' { Instance.dsk = Instance.dsk inst >> > + , Instance.diskTemplate = dt } >> > + in case Node.addPri node inst'' of >> > + Types.OpFail Types.FailDisk -> True >> > + _ -> False >> > >> > prop_Node_addPriFC = >> >> Same for this one, while you're at it! :) > > Heh, sure, but note that these were old functions :) >
LGTM. :) of course they were, but better to explain them late than never! :) G
