Statistics
| Branch: | Tag: | Revision:

root / htest / Test / Ganeti / HTools @ 26d62e4c

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

Latest revisions

# Date Author Comment
26d62e4c 10/08/2012 12:35 pm Iustin Pop

Rename Ganeti/HTools/Utils.hs to Ganeti/Utils.hs

This is, I believe, the last non-htools specific file that still lived
in the htools directory; it's already widely used in non-htools code,
so let's move it before we add more functionality to this module....

42834645 09/26/2012 02:18 pm Iustin Pop

Remove generic options from individual programs

Currently, we test and require that each individual program (hbal,
etc.) defines/supports the generic options (currently --help and
--version). Even with the test, this is not optimal, since it requires
changes in many places whenever we modify the list of generic options,...

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

9e679143 09/08/2012 12:20 am Iustin Pop

Improve the `AllocPolicy' test

This test has a few deficiencies, which this patch addresses:

- using arbitrary 1 or 2 node count for allocation is obsolete,
nowadays we need to use a number appropriate for the instance's disk
template (and we should remove that parameter…)...

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

View revisions

Also available in: Atom