History | View | Annotate | Download (7 kB)
Add generator for an instance on a node list
Given a node list in input, we get an instance that had nodes in it.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add generator for list of arbitrary instances
This takes an instance generator and produces a possibly empty list ofinstances.
Create a genInstanceMaybeBiggerThan function
This is used only once when testing Cluster.hs, but having it abstractedclarifies there what that call is about, makes that test shorter, andallows us to better do refactoring of the main genInstanceSmallerThan...
Make QuickCheck generator names more uniform
Due to lack of attention, we have two styles for generators ofarbitrary values: get* and gen* (e.g. getFQDN and genDiskIndices). Inorder to make this more obvious that we deal with a function in theGen monad, let's rename all get* functions to gen*....
Cleanup HTools.Types/BasicTypes imports
Before we reorganised the source tree, the 'Result' type was exportedfrom HTools/Types.hs. This changed during the reorg, but at that timewe didn't change the exports; instead, we kept re-exporting it fromthe old module for compatibility....
Improve the `CanTieredAlloc' test
Currently, this test is very slow. Upon investigation, this is due tohow `tieredAlloc' works:
- tries to allocate one instance- if failed, shrink the instance by the "most failed" resource- restart
In this algorithm, if the "most failed" resource is e.g. memory, and...
Fixup test suite names
The names were not in a proper hierarchy, leading to inconsistenciesabout what they were actually tested.
We change this by reproducing in the test names the relative hierarchywithin the Ganeti directory, leading to nicer test suite names (in...
Simplify property and test case names
Since we now have separate namespaces due to the multi-file split, wedon't need to keep the name of the module in the property names, as wedon't have so many potential conflicts anymore.
We remove the group prefix handling from TestHelper and simply do a...
Split most HTools test code into separate files
Except for Ganeti.HTools.JSON, which needs rename, we split all theother test suites into separate files.
We have to add another common test helper, due to import dependencies(sigh), but otherwise this split is pretty straightforward....