Statistics
| Branch: | Tag: | Revision:

root / htest / Test / Ganeti / Objects.hs @ fb243105

History | View | Annotate | Download (7.5 kB)

# Date Author Comment
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 <>

9924d61e 09/05/2012 05:18 pm Iustin Pop

Add entire ConfigData serialisation tests

Using the recently-added genArbitrary, we can now implement Arbitrary
instances for even "huge" objects like Cluster, so let's use that to
implement entire ConfigData serialisation tests.

Note that, as we don't have yet proper types for some of the Params...

b9bdc10e 09/05/2012 05:18 pm Iustin Pop

Add some unittests for node queries

These new tests check that:

- no known fields return unknown
- any unknown field returns unknown
- the type of the fields is consistent between the getters and the
field definition
- the length of each result row corresponds with the number of fields...

8d2b6a12 09/05/2012 04:58 pm Iustin Pop

Add unit test for serialisation of DiskLogicalId and Nodes

Since the DiskLogicalId type is manually serialised/deserialised (see
Objects.hs, `encodeDLid' and `decodeDLId'), let's add a test that
checks that these are idempotent when combined.

Since we're at it, let's add the same test for Node serialisation,...

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

ce93b4a0 09/05/2012 04:58 pm Iustin Pop

Add Instance serialisations tests

This is not perfect, as for many of the parameters we don't have good
Arbitrary instances, but is better than nothing.

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

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

305e174c 09/04/2012 04:50 pm Iustin Pop

Split Rpc tests from QC

This required lots of other code moves, so I created it as a
standalone patch.

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

e5a29b6c 09/04/2012 04:50 pm Iustin Pop

Split out Objects.hs from QC.hs

This is the first file split out from QC.hs - an easy one, since it
has just one test.

The patch changes the way we build hpc excludes, since now we'll have
many modules that need to be excluded, and hpc doesn't seem to be able...