Statistics
| Branch: | Tag: | Revision:

root / htest / Test / Ganeti / Query @ 22381768

Name Size
Filter.hs 7.5 kB
Language.hs 5.3 kB
Query.hs 10.3 kB

Latest revisions

# Date Author Comment
5183e8be 10/25/2012 01:05 pm Iustin Pop

Convert query path from string errors to GanetiException

This patch converts all the call paths from 'Result' (which contains
just string errors) to 'ErrorResult', which holds
GanetiException-encoded errors. We can now return proper
OpPrereq/OpExec errors to the clients of the luxi/query socket....

942a9a6a 10/22/2012 06:19 pm Iustin Pop

Remove multiple uses of '.&&.' with conjoin

This is just a bit of cleanup. The (.&&.) operator is internally just:

a .&& b = conjoin [a, b]

so let's replace 'a .&&. b .&&. c .&&. d' directly with 'conjoin [a,
b, c, d]'.

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

2d52359b 10/11/2012 01:03 pm Iustin Pop

Cleanup/expand the filter/query tests

This patch cleans up duplicate code in Test.Ganeti.Query.Filter and
then adds a test for names consistency with Python's code behaviour
(stable ordering for simple filters and otherwise niceSort'ed
ordering).

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

bc4cdeef 10/11/2012 01:03 pm Iustin Pop

Add functionality for checking validity of names

This replicates in the Haskell Query2 implementation the behaviour of
the Python code: if a "simple" filter is passed (one that contains
only Or aggregators and EQ binary ops on the name field), then an
failure is flagged if the given values are not known....

1fc3812c 10/11/2012 01:03 pm Iustin Pop

Switch ordering of names on query to niceSort

This makes the "all" names queries consistent with the Python
results. The change requires updating the unittests, at which point a
duplicate error message is simplified.

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

b3d17f52 10/11/2012 01:03 pm Iustin Pop

Add a makeSimpleFilter function

And associated unittests. This will be needed for classic-style
queries.

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

fa2c927c 09/26/2012 07:35 pm Agata Murawska

Add live parameter to query

The tests we currently have assume, that all the data required for
running the query is available - once we add live data, this will no
longer be the case.

This patch adds boolean parameter to query function, which tells it
whether to ignore live parameters gathering....

a9d6f4e0 09/26/2012 07:34 pm Agata Murawska

Tests for NodeGroup query

This adds tests similar to those used for node query. For now the
prop_queryGroup_noUnknown is disabled and commented out, as it is
fasifiable with ndparams and ipolicy. It may be removed or fixed
later on.

Also, prop_queryGrooup_types has one less property checked - it is...

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

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

View revisions

Also available in: Atom