| Branch: | Tag: | Revision:

root / htest / Test / Ganeti / HTools @ 22381768

Name Size
CLI.hs 4.4 kB
Cluster.hs 18 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.1 kB

Latest revisions

# Date Author Comment
5e9deac0 11/20/2012 11:16 am Iustin Pop

Create a new Ganeti/Types.hs module

There are already three cases where we copied type definitions between
the htools-specific types into the main ganeti code. Let's stop doing
this ☺ and create a common types module that holds these.

Note that there already exists BasicTypes.hs, but that refers to very...

39f0eea5 11/13/2012 03:42 pm Iustin Pop

Automatically enable version-dependent GHC flags

Some GHC flags are very useful, but only appear in more recent GHC
versions. To support the use of such flags while still supporting
older compilers, let's add conditional checks and enabling based on
the results....

29a30533 11/12/2012 01:21 pm Iustin Pop

Remove unsafePerformIO usage

We need to change a few things, most importantly CLI options defaults,
but otherwise we already used the path to files from functions which
were already in the I/O monad, so we don't have to change much of the
code flow.

Additionally, Path.hs now has an explicit export list, to stop...

d66aa238 11/12/2012 01:19 pm Iustin Pop

Change type of program options to 'IO [Options]'

Some options have defaults that depend on the environment, and we
could handle these in two ways:

- use a place-holder value (e.g. data X a = Default | Custom a) that
is later read from the environment
- move the options list to IO monad, where it can read the...

b9612abb 11/07/2012 03:06 pm Iustin Pop

Merge branch 'devel-2.6' into submit

  • devel-2.6:
    Fix compatibility with newer Haskell libraries
    Fix gnt-instance console with xl

Conflicts: (reordering, fixed)
htools/Ganeti/Confd/Server.hs (hlint fixes on master)
htools/Ganeti/Daemon.hs (hlint)...

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

View revisions

Also available in: Atom