Statistics
| Branch: | Tag: | Revision:

root / Ganeti / HTools / QC.hs @ a423b510

History | View | Annotate | Download (27 kB)

# Date Author Comment
32b8d9c0 12/01/2010 03:00 pm Iustin Pop

Add two functions for checking cluster consistency

For now, we don't support instances allocated across two groups, and we
will reject such clusters. The isClusterConsistent function will return
a list of inconsistent instances, potentially allowing operation without...

d8bcd0a8 12/01/2010 03:00 pm Iustin Pop

Add function for nodes to (nodgroup, nodes) split

Unittests included. The function will be needed for consistency checks
in the algorithms.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

c4d98278 12/01/2010 03:00 pm Iustin Pop

Add a type alias for UUIDs

This is to pottentially allow easier changes later.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

a68004b7 11/24/2010 03:55 pm Iustin Pop

Node: add the node group's UUID

This is not used anywhere yet, and the backend are all just adding the
default UUID, not the real one.

The patch also allows displaying the group UUID in the node list.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

e3ae9508 10/07/2010 03:42 pm Iustin Pop

Fix some warnings in unittests

848b65c9 09/03/2010 06:02 pm Iustin Pop

Use the mingain options in the balancing algorithm

Also adds them in hbal.

94d08202 08/30/2010 12:12 pm Iustin Pop

Change iterateAlloc to return the instance list

The Cluster.iterateAlloc and tieredAlloc functions are changed to also
return the updated instance list, since it is needed to have a “full”
cluster view.

50811e2c 08/25/2010 07:04 pm Iustin Pop

Add unittest for Node text serialization

This checks that the Node text serialization and deserialization
operations are idempotent when combined other.

a070c426 08/25/2010 06:53 pm Iustin Pop

Switch unittest to custom hostnames

Currently, the hostnames are almost fully arbitrary chars, which breaks
the assumption that nodes/instances will be normal DNS hostnames.

This patch adds some custom generators for these hostnames, that will
allow better testing of text loader serialization/deserialization.

b8262965 07/22/2010 04:57 pm Iustin Pop

Fix another haddock issue

691dcd2a 07/22/2010 06:03 am Iustin Pop

Remove an obsolete function and add Utils tests

223dbe53 07/22/2010 01:42 am Iustin Pop

Add some more imports to QC.hs

This is needed so that in the coverage report we list all modules, even
the ones we don't test at all, such that we get the complete results.

95446d7a 06/21/2010 12:12 pm Iustin Pop

Fix another haddock special-char issue

db079755 06/21/2010 05:59 am Iustin Pop

Remove JOB_STATUS_GONE and add unittests

… for the serialization/deserialization of the job and opcode status.

Job status 'gone' was not actually used. It can be reintroduced if
needed.

4a007641 06/03/2010 12:08 am Iustin Pop

Fix some lint errors in the unit tests

9c0a748f 06/01/2010 11:51 pm Iustin Pop

Fix a warning in Loader tests

Incomplete pattern match…

c088674b 06/01/2010 08:54 pm Iustin Pop

Add a few Loader tests

These are not comprehensive, but at least we have a start.

9e35522c 05/28/2010 12:13 pm Iustin Pop

Reduce the warnings during the unittests

Since the unittests are not 'clean' from the p.o.v. of type
declarations, and cannot be made clean in all respects (e.g. orphan
instances), we silence some warnings for the test target, to have a
cleaner output.

88f25dd0 05/28/2010 12:25 am Iustin Pop

Introduce OpCode unittests

82ea2874 05/27/2010 01:11 am Iustin Pop

A few more small Node unit-tests

39d11971 05/25/2010 08:17 pm Iustin Pop

Add more unittests

Instance, Node and Text modules have improved coverage.

3fea6959 05/20/2010 07:45 pm Iustin Pop

Add more unit tests for allocation/balance

The patch adds some simple unit-tests for both the allocation function
(we can allocate small instances on an empty cluster, we can allocate in
tiered more starting from any size) and the balancing functions (one...

49f9627a 05/20/2010 12:07 pm Iustin Pop

Change some test constants

First, we reduce the max size of the disks, since Int on 32bits will
overflow for big simulated clusters. This is a real issue, that will
need fixing in real life, but for now we just "silence" this test.

Second, we increase the amount of time a test is allowed to run,...

8fcf251f 05/19/2010 04:09 pm Iustin Pop

Add more unit tests

This increases the overall coverage by 5%-10% (depending on coverage
type). Some modules are still not unittested at all, as HUnit is a
better choice for them.

a46f34d7 02/25/2010 03:47 pm Iustin Pop

Abstract instance running states into a list

This removes some manual checks from a few places in the code with a
single list defined once.

434c15d5 12/02/2009 12:57 pm Iustin Pop

Fix unittests after instance tags addition

3a3c1eb4 10/15/2009 11:33 am Iustin Pop

More hlint fixes

This makes (for now) the code hlint-clean. This is per se not a huge
gain, but it allows easier tracking of regressions in style later
(one-two new violations are easier to diagnose when not hidden among 20
“known” ones).

c15f7183 10/14/2009 04:43 pm Iustin Pop

Style change: camel-casing of unittests

2060348b 10/14/2009 04:41 pm Iustin Pop

Style change: node and instance attributes

This changes from a_b to aB in all node and instance attributes, to
match the standard Haskell style. Also attributes that should have been
camel-cased but weren't were changed (e.g. plist → pList, pnode →
pNode).

685f5bc6 09/28/2009 05:09 pm Iustin Pop

Brown bag fix: invert a test

During testing I used the test inversely to see it triggers correctly,
and committed by mistake the inverted test. Fixing it.

fbb95f28 09/28/2009 05:09 pm Iustin Pop

Turn on, and fix, more warnings

The Makefile was intented to be -Wall and not simply -W, but I missed
that. This enables more warnings and also enables -Werror (except for
the tests).

45ab6a8d 09/28/2009 04:16 pm Iustin Pop

Add support for building without curl

Since curl is not always needed (e.g. when only using luxi or less
likely file backends only) and is also not always available, it is
useful for building without it. This of course disabled the RAPI
backend.

This patch changes ExtLoader to build with the ‘-cpp’ option which makes...

1ae7a904 09/01/2009 01:54 am Iustin Pop

Add some more instance tests

This include instance text load tests.

cf35a869 09/01/2009 01:54 am Iustin Pop

Test some cases for the cluster score computation

79a72ce7 07/07/2009 07:10 pm Iustin Pop

Fix unittests

The recent OpResult and CPU values additions broke unittests.

9f6dcdea 07/06/2009 11:50 pm Iustin Pop

Fix hlint-generated warnings

This big patch cleans up the code per hlint indications. Many removals
of extra parentheses, replacements of concat . map with concabtMap,
extra dollar signs, eta reductions, etc. were performed.

The code still compiles and passes a couple of manual tests on sample...

9b1e1cc9 06/01/2009 01:25 pm Iustin Pop

Ensure consistent naming of the tools

This patch makes sure that all references to the name of the software is
ganeti-htools, not simply htools.

e2fa2baf 06/01/2009 12:55 pm Iustin Pop

Add copyright/license information

This doc-patch adds copyright and license information to (hopefully) all
needed files.

7dd5ee6c 06/01/2009 12:24 pm Iustin Pop

tests: move the test declaration in QC.hs

This patch moves the test declaration into QC.hs, so that test.hs has to
be modified only when we add a new test category.

095d7ac0 06/01/2009 12:18 pm Iustin Pop

A simple test for Container.addTwo

7bc82927 06/01/2009 12:17 pm Iustin Pop

Add some very trivial Instance tests

This is more of an exercise in QuickCheck than strong testing.

9cf4267a 06/01/2009 12:14 pm Iustin Pop

Finish removal of unused params from PeerMap

This completes the removal started earlier byt removeing the need to
pass the number of nodes to Node.buildPeers, which is now unused.

15f4c8ca 06/01/2009 12:14 pm Iustin Pop

Add test infrastructure and initial tests

This patch adds a QuickCheck-based test infrastructure and initial tests
based on it. The PeerMap module has a 100% coverage ☺

Side-note: one has to read the source of QuickCheck to see how to use it
(especially the Batch submodule), the docs are not enough…