Statistics
| Branch: | Tag: | Revision:

root / htest / Test / Ganeti @ 51000365

Name Size
  Confd
  HTools
  Query
BasicTypes.hs 5 kB
Common.hs 4.7 kB
Daemon.hs 2.4 kB
JSON.hs 1.7 kB
Jobs.hs 1.5 kB
Luxi.hs 4.9 kB
Objects.hs 7.5 kB
OpCodes.hs 5.4 kB
Rpc.hs 2.7 kB
Ssconf.hs 1.3 kB
TestCommon.hs 6 kB
TestHTools.hs 4.7 kB
TestHelper.hs 4.7 kB
TestImports.hs.in 149 Bytes

Latest revisions

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

3ce788db 09/05/2012 05:31 pm Iustin Pop

Fix deserialisation bug in ResultEntry

Found via the newly added unit-tests, which test most of the
serialisation code in Query/Language (except for QueryResult, for
which we already tests both sub-components separately).

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

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

Add query filter tests

These tests are node specific only because we don't have other query
types implemented yet, but what they actually test is the various
filter types.

The tests are trying to cover most filter functionality; missing for
now is proper checking for ContainsFilter and TrueFilter, the rest...

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

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

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

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

8492daa3 09/05/2012 05:18 pm Iustin Pop

Introduce a helper for simple Arbitrary instances

After getting really annoyed at yet another "<*> arbitrary", I thought
that we should be able to automate this, at least for types which are
simple enough and have already all the "prerequisites".

Hence the new genArbitrary function and its helpers, which can:...

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

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

View revisions

Also available in: Atom