Statistics
| Branch: | Tag: | Revision:

root / htest / Test / Ganeti / HTools @ fb243105

Name Size
CLI.hs 4.3 kB
Cluster.hs 17.6 kB
Container.hs 3 kB
Instance.hs 5.3 kB
Loader.hs 3.5 kB
Node.hs 11.3 kB
PeerMap.hs 2.6 kB
Simu.hs 3.5 kB
Text.hs 8 kB
Types.hs 5.4 kB
Utils.hs 4.9 kB

Latest revisions

# Date Author Comment
650e5aa4 09/08/2012 12:20 am Iustin Pop

Improve the prop_Alloc_sane test to detect mis-allocations

Currently, this just checks that a cluster cannot be rebalanced after
a single instance allocation. However, we can also test whether the
allocation decision computed a correct new cluster score, by checking...

d83903ee 09/08/2012 12:20 am Iustin Pop

Add new test for checking multi-allocations

This test expands the "single-alloc-no-rebalance" by allocating a few
instances on a small cluster, and ensuring that after we allocate all
of them, either we can't rebalance or if we rebalance the score
improvement is very small....

fb243105 09/08/2012 12:20 am Iustin Pop

Improve the `CanTieredAlloc' test

Currently, this test is very slow. Upon investigation, this is due to
how `tieredAlloc' works:

- tries to allocate one instance
- if failed, shrink the instance by the "most failed" resource
- restart

In this algorithm, if the "most failed" resource is e.g. memory, and...

51000365 09/05/2012 05:31 pm Iustin Pop

Rework CLI modules and tests

While investigating how we could test the Daemon.hs module, I realised
that we have a very, erm, sub-optimal situation:

- HTools/CLI.hs has a nice IO/pure separation testing in cmdline
parsing, which allows some basic functionality to be tested, but...

5b11f8db 09/05/2012 05:31 pm Iustin Pop

Further hlint fixes

Commit 2cdaf22, “Re-enable standard hlint warnings”, got it almost
right. The only problem is that (confusingly) the default set of hints
is not in HLint.Default, but in HLint.HLint (it includes Default and
some built-ins).

After changing the lint file to correctly include the defaults, we had...

7022db83 09/05/2012 05:18 pm Iustin Pop

Replace manual arbitrary instances with genArbitrary

There are a few more that could be replaces, once we start using
appropriate (new)types.

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

2e0bb81d 09/05/2012 05:18 pm Iustin Pop

Add a small 'passTest' helper

This is symmetric to failTest, and allows us to use it in cases where
we need to return a property.

While replacing 'property True' with it, I saw a case where we can
simplify the use and thus reworked that check.

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

63b068c1 09/05/2012 04:58 pm Iustin Pop

Add a test helper for simple JSON serialisation testing

While adding yet another JSON serialisation test, I realised that this
can be trivially abstracted; hence this patch, replacing both simple
versions (readJSON . showJSON == id) and the standard version (with...

e09c1fa0 09/05/2012 03:34 pm Iustin Pop

Fixup test suite names

The names were not in a proper hierarchy, leading to inconsistencies
about what they were actually tested.

We change this by reproducing in the test names the relative hierarchy
within the Ganeti directory, leading to nicer test suite names (in...

20bc5360 09/05/2012 03:34 pm Iustin Pop

Simplify property and test case names

Since we now have separate namespaces due to the multi-file split, we
don't need to keep the name of the module in the property names, as we
don't have so many potential conflicts anymore.

We remove the group prefix handling from TestHelper and simply do a...

View revisions

Also available in: Atom