Statistics
| Branch: | Tag: | Revision:

root / htest @ 7a07475f

Name Size
  Test
  data
  shelltests
cli-tests-defs.sh 1.2 kB
hpc-htools.hs 19 Bytes
live-test.sh 5 kB
offline-test.sh 3.2 kB
test.hs 3 kB

Latest revisions

# Date Author Comment
5183e8be 10/25/2012 01:05 pm Iustin Pop

Convert query path from string errors to GanetiException

This patch converts all the call paths from 'Result' (which contains
just string errors) to 'ErrorResult', which holds
GanetiException-encoded errors. We can now return proper
OpPrereq/OpExec errors to the clients of the luxi/query socket....

ef3ad027 10/25/2012 12:38 pm Iustin Pop

Add an Errors module mirroring the Python one

As described in the module doc string, while writing this it dawned
upon me that we're mixing all errors together into a single hierarchy
(well, type on the Haskell side), which is not good. Some errors are
used purely within noded, some in the CLI frontends, etc. so these...

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....

707cd3d7 10/18/2012 12:11 pm Helga Velroyen

Use exitErr instead of explicit error message and exitWith

Furthermore, a few messages have their capitalisation changed (fixed).

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

93be1ced 10/17/2012 07:53 pm Iustin Pop

Generalise the Result type

Currently, our error monad—Result—has a plain string error type. This
is not good, as we don't have structured errors, we can't pass back
proper error information to Python code, etc.

To solve this, we generalise this type as 'GenericResult a', and make...

View revisions

Also available in: Atom