Statistics
| Branch: | Tag: | Revision:

root / htest / Test / Ganeti / HTools @ 879d9290

Name Size
  Backend
CLI.hs 4.3 kB
Cluster.hs 17.9 kB
Container.hs 3 kB
Instance.hs 5.4 kB
Loader.hs 3.4 kB
Node.hs 12 kB
PeerMap.hs 2.6 kB
Types.hs 5.5 kB

Latest revisions

# Date Author Comment
879d9290 10/26/2012 03:05 pm Iustin Pop

Move htools backends to a separate directory

Five modules under the HTools/ directories are backend
implementations, so let's move them to a separate directory, to more
clearly show the hierarchy. I wanted to do this for a while, but
merging between branches is always an issue, so let's do it know since...

66ad857a 10/26/2012 02:22 pm Iustin Pop

Fix a few issues found by newer hlint

Testing with a newer hlint found a few minor issues; but all are real,
valid recommendations:

- don't use "if cond then f x else f y", but "f (if cond then x else y)"
- "if a then b else True" is equivalent to the simpler "not a || b"...

942a9a6a 10/22/2012 06:19 pm Iustin Pop

Remove multiple uses of '.&&.' with conjoin

This is just a bit of cleanup. The (.&&.) operator is internally just:

a .&& b = conjoin [a, b]

so let's replace 'a .&&. b .&&. c .&&. d' directly with 'conjoin [a,
b, c, d]'.

Signed-off-by: Iustin Pop <>...

41eb900e 10/22/2012 06:19 pm Iustin Pop

Improve message for (==?) operator

After seeing how nice HUnit formats the error message on failed
'assertEqual', I think we can do better with ==?. Currently it says
(on one line): "Expected equality, but 1 /= 2".

This patch changes the code to format it similar to HUnit:...

dddb2bc9 10/22/2012 02:20 pm Helga Velroyen

Annotated inequality operator for unit test properties

This includes: * The operator (/=?), which checks for inequality and prints
an error message if it encounters equality. (Basically the
negation of the (==?) operator). * Application of this operator in the test property...

77ffd663 10/22/2012 12:31 pm Helga Velroyen

Fix setting of 'failN1' flag for corner case

This patch includes:

  • The 'failN1' flag is now only set if there is strictly less
    memory available than required for failover.
  • Unit tests for that.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Iustin Pop <>

dd77da99 10/22/2012 12:29 pm Helga Velroyen

A few unittests improvements

Small simplifications of other unit tests using the (==?)
operator when possible, and typo fixes.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Iustin Pop <>

a8038349 10/18/2012 01:55 pm Iustin Pop

Remove custom OpResult type/monad

Since we now have the GeneralResult as a multi-purpose monad, we can
remove the custom OpResult monad, and just use 'GeneralResult
FailMode' as our type. This allows removal of a few bits of
specialised infrastructure, relying instead on the generic one....

01e52493 10/15/2012 07:56 pm Iustin Pop

Cleanup HTools.Types/BasicTypes imports

Before we reorganised the source tree, the 'Result' type was exported
from HTools/Types.hs. This changed during the reorg, but at that time
we didn't change the exports; instead, we kept re-exporting it from
the old module for compatibility....

235a0fa5 10/10/2012 06:28 pm Dato Simó

(htest) Text.hs: fix typo in comment

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

View revisions

Also available in: Atom