Revision 650e5aa4

b/htest/Test/Ganeti/HTools/Cluster.hs
134 134
      reqnodes = Instance.requiredNodes $ Instance.diskTemplate inst
135 135
  in case Cluster.genAllocNodes defGroupList nl reqnodes True >>=
136 136
     Cluster.tryAlloc nl il inst' of
137
       Types.Bad _ -> False
137
       Types.Bad msg -> failTest msg
138 138
       Types.Ok as ->
139 139
         case Cluster.asSolution as of
140
           Nothing -> False
140
           Nothing -> failTest "Failed to allocate, empty solution"
141 141
           Just (xnl, xi, _, cv) ->
142 142
             let il' = Container.add (Instance.idx xi) xi il
143 143
                 tbl = Cluster.Table xnl il' cv []
144
             in not (canBalance tbl True True False)
144
             in printTestCase "Cluster can be balanced after allocation"
145
                  (not (canBalance tbl True True False)) .&&.
146
                printTestCase "Solution score differs from actual node list:"
147
                  (Cluster.compCV xnl ==? cv)
145 148

  
146 149
-- | Checks that on a 2-5 node cluster, we can allocate a random
147 150
-- instance spec via tiered allocation (whatever the original instance

Also available in: Unified diff