| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools @ 89298c04

Name Size
CLI.hs 19.8 kB
Cluster.hs 60.9 kB
Compat.hs 1.4 kB
Container.hs 2.4 kB
ExtLoader.hs 4.7 kB
Group.hs 2.5 kB
IAlloc.hs 14 kB
Instance.hs 10.2 kB
JSON.hs 4 kB
Loader.hs 12.9 kB
Luxi.hs 9.8 kB
Node.hs 20 kB
PeerMap.hs 2.9 kB
QC.hs 56.5 kB
QCHelper.hs 1.4 kB
Rapi.hs 7.2 kB
Simu.hs 3.7 kB
Text.hs 12 kB
Types.hs 11.3 kB
Utils.hs 6.1 kB 260 Bytes

Latest revisions

# Date Author Comment
89298c04 01/16/2012 02:49 pm Iustin Pop

Add some very basic options test

Just tests that passing a string argument returns it correctly. We're
not interested in the flags themselves that much just that the
function itself parses some options at least correctly.

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

51c3d88f 01/16/2012 02:49 pm Iustin Pop

Split CLI.parseOpts into IO/non-IO parts

This will allow unittesting the CLI options much more easily. The
patch also fixes an inconsistency: usage help was displayed with an
extra new line in the error case (but not in --help).

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

a7ea861a 01/16/2012 02:49 pm Iustin Pop

Add test for CLI.parseYesNo

Also fix a tiny typo in the docstring.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

8b5a517a 01/16/2012 02:49 pm Iustin Pop

Fix bug in CLI.parseISpecString and add test

'zip' finishes on the shortest list, so parseISpecString accepted any
string of 3 values or more, which is not good. Fix this and add test
for both successful and failed parsing.

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

e1dde6ad 01/16/2012 02:49 pm Iustin Pop

Add a unittest for the 'Simu' backend

This only test successful parsing, but for this case it tests
reasonably well the resulting cluster properties, I think (coverage
is >70% for expressions).

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

59ed268d 01/16/2012 02:49 pm Iustin Pop

Further optimise instance test data generation

Following on the lessons from this week (commit 7806125e), this patch
replaces generation of instances `suchThat` they are smaller than on
node with direct generation of instances with upper bounds on

7806125e 01/13/2012 04:58 pm Iustin Pop

Fix very slow unit-test data generation in some cases

Learning, learning. It turns out that for objects with even just five
fields, generating them and filtering can be costly, especially when
the filtering is nested (as it was in this case, arbitrary1 →...

746b7aa6 01/13/2012 04:58 pm Iustin Pop

Fix one bad unit-test data generation case

It could happen that the node is generated with 0 disk available, in
which case the operation will fail due to disk issues, not CPU. Fix
this by using the recently-introduced genOnlineNode helper.

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

16670b57 01/13/2012 03:24 pm Iustin Pop

Remove some dead code

While wondering why Cluster.tryReloc is not unit-tested, I realised
that this is no longer uses. Apparently, last summer's new IAllocator
modes and related changes have silently deprecated this function.

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

3074ccaf 01/13/2012 03:24 pm Iustin Pop

Fix another data generation issue in tests

Another "good" seed value manages to generate nodes with identical
names, which of course makes the sets be of smaller value than the
lists. Avoid this issue by generating unique node names.

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

View revisions

Also available in: Atom