| Branch: | Tag: | Revision:

root / htools / test.hs @ 4cbe9bda

History | View | Annotate | Download (3.5 kB)

# Date Author Comment
adb77e3a 09/03/2012 03:13 pm Iustin Pop

Add a fillDict function

This is similar to the Python version,

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

998b6f8b 08/28/2012 06:32 pm Iustin Pop

Add two confd library tests

These test that we encode requests correctly and decode good messages,
that a message with a too old/new timestamp is never accepted, and
that a message signed with a different key is never accepted.

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

2c4eb054 08/28/2012 06:04 pm Iustin Pop

Rename tests for nicer names in test output

With the change to test-framework, where individual tests are listed,
QCHelper tries to remove a "prop_$group_" prefix from the function
names, for shorter names. However, some test groups (LUXI) and test
functions are not uniform, leading to long names, so we should fix...

95f6c931 08/28/2012 06:03 pm Iustin Pop

Switch Haskell test harness to test-framework

This patch replaces our home-grown, and quite limited, test runner
infrastructure with test-framework
( The rationale for
doing so is as follows:

- we will need to add support for HUnit tests, so either we add more...

dc6a0f82 08/28/2012 06:00 pm Iustin Pop

Rename Query2.hs to Qlang.hs

While starting to use the new filter types, I realised that what is
currently implemented is the equivalent of `lib/', not
`lib/', since we only deal with data types for now and not the
actual query runtime functionality (RPC, config, etc.)....

e8a25d62 08/28/2012 06:00 pm Iustin Pop

Implement Query2 filter JSON (de)serialisation

This adds support for encoding/decoding Query2 filters to/from JSON,
in (hopefully) the same format as the Python code generates.

It also adds a simple unit-test to check that this conversion is
idempotent. Of note here is that, since the Filter data type is...

66f74cae 08/28/2012 12:56 pm Agata Murawska

Simple QC tests for RPC calls

Right now we're only able to test if when a node is offline, the call
fails with an appropriate errror.

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

c5b4a186 06/08/2012 02:02 pm Iustin Pop

Fix prefix bug in Haskell ssconf implementation

This patch fixes a (brown-bag) bug in the ssconf implementation where
the looked-for filenames were not prefixed with the ssconf file

Additionally, a test for this is added (which fails without the fix)....

cdd495ae 05/08/2012 01:37 pm Iustin Pop

Add decoding of Luxi calls and unittests for LuxiOp

This patch adds a hand-coded decoder for LuxiCall arguments, as the
data-structure is not uniform enough for automated generation (even
for the serialisation, we had to add hints for some fields,
de-serialisation is even harder)....

3ad57194 05/08/2012 01:37 pm Iustin Pop

Add a new JSON function

And its associated unittests.

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

ee4ffc8a 02/29/2012 04:18 pm Iustin Pop

Allow overriding the target test count

This is not perfect, as the override applies identical target test
values to both the 'fast' and 'slow' tests (making the slow tests take
a long time), but it allows a quick override for manual runs.

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

8b5a517a 01/16/2012 02:49 pm Iustin Pop

Fix bug in CLI.parseISpecString and add test

'zip' finishes on the shortest list, so parseISpecString accepted any
string of 3 values or more, which is not good. Fix this and add test
for both successful and failed parsing.

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

e1dde6ad 01/16/2012 02:49 pm Iustin Pop

Add a unittest for the 'Simu' backend

This only test successful parsing, but for this case it tests
reasonably well the resulting cluster properties, I think (coverage
is >70% for expressions).

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

3603605a 12/08/2011 10:00 am Iustin Pop

Cleanup hlint errors

First, we update the recommended hlint version to what I used to get a
clean output (1.8.15). Most of the changes are:

- remove unneeded parentheses
- some simplifications (intercalate " " → unwords, maybe … id →
fromMaybe, etc.)
- removal of some duplicate code (in previous patches)...

7345b69b 11/18/2011 07:20 pm Iustin Pop

htools: adjust imports for newer compilers

While testing with ghc 7.2, I saw that some imports we are using are
very old (from ghc 6.8 time), even though current libraries are using
different names.

We fix this and bump minimum documented version to ghc 6.12, as I...

ebf38064 11/17/2011 03:49 pm Iustin Pop

htools: reindent the rest of the files

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

72bb6b4e 10/03/2011 12:17 pm Iustin Pop

A few minor test improvements

This patch adds a few niceties to the test suite:

- allows matching test groups case insensitive and emit warnings when
we give test group names that don't match anything
- add a new operator that is similar to assertEqual in Python: it...

23fe06c2 10/03/2011 12:17 pm Iustin Pop

Use TemplateHaskell to decorate tests with names

This makes error message change from "Test 4 failed …" to "Test
prop_Loader_mergeData failed", which is much more readable. It also
removes the duplication of test suite names in the test.hs file.

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

179c0828 07/21/2011 02:50 pm Iustin Pop

htools: further docstring fixes

This adds parameter documentation for Cluster.iMoveToJob (I think it
was not clear if the new or old node list is needed) and fixes other
docstring style issues.

After this patch, all modules except for CLI.hs (which has many...

3c002a13 07/13/2011 01:37 pm Iustin Pop

htools: add some unittests for Types.hs

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

525bfb36 07/13/2011 01:01 pm Iustin Pop

htools: docstring fixes and improvements

No code changes (except one definition being moved around in QC.hs)
are contained in this patch.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

509809db 06/28/2011 06:37 pm Iustin Pop

htools: allow unittest to be replayed

This just adds glue to allow replaying of tests using a given RNG state
and test size (both are needed for exact replayability).

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

8e4f6d56 06/28/2011 06:37 pm Iustin Pop

htools: Switch to QuickCheck 2.x

Since current distros don't package anymore QuickCheck 1.x, let's move
to 2.x.

This requires also a few changes to the code:

- Test.QuickCheck.Batch doesn't exist anymore, so we need to write some
scaffolding code to replace it...

dc384cf0 03/17/2011 06:04 pm Iustin Pop

Merge remote branch 'htools/master'

  • htools/master: (605 commits)
    Update NEWS file for version 0.3.1
    Update copyright years in the man pages
    Remove obsolete env vars from the manpages
    Fix dist archive generation
    luxi backend: show attribute names in errors...