History | View | Annotate | Download (25.9 kB)
Fix some warnings in unittests
Use the mingain options in the balancing algorithm
Also adds them in hbal.
Change iterateAlloc to return the instance list
The Cluster.iterateAlloc and tieredAlloc functions are changed to alsoreturn the updated instance list, since it is needed to have a “full”cluster view.
Add unittest for Node text serialization
This checks that the Node text serialization and deserializationoperations are idempotent when combined other.
Switch unittest to custom hostnames
Currently, the hostnames are almost fully arbitrary chars, which breaksthe assumption that nodes/instances will be normal DNS hostnames.
This patch adds some custom generators for these hostnames, that willallow better testing of text loader serialization/deserialization.
Fix another haddock issue
Remove an obsolete function and add Utils tests
Add some more imports to QC.hs
This is needed so that in the coverage report we list all modules, eventhe ones we don't test at all, such that we get the complete results.
Fix another haddock special-char issue
Remove JOB_STATUS_GONE and add unittests
… for the serialization/deserialization of the job and opcode status.
Job status 'gone' was not actually used. It can be reintroduced ifneeded.
Fix some lint errors in the unit tests
Fix a warning in Loader tests
Incomplete pattern match…
Add a few Loader tests
These are not comprehensive, but at least we have a start.
Reduce the warnings during the unittests
Since the unittests are not 'clean' from the p.o.v. of typedeclarations, and cannot be made clean in all respects (e.g. orphaninstances), we silence some warnings for the test target, to have acleaner output.
Introduce OpCode unittests
A few more small Node unit-tests
Add more unittests
Instance, Node and Text modules have improved coverage.
Add more unit tests for allocation/balance
The patch adds some simple unit-tests for both the allocation function(we can allocate small instances on an empty cluster, we can allocate intiered more starting from any size) and the balancing functions (one...
Change some test constants
First, we reduce the max size of the disks, since Int on 32bits willoverflow for big simulated clusters. This is a real issue, that willneed fixing in real life, but for now we just "silence" this test.
Second, we increase the amount of time a test is allowed to run,...
Add more unit tests
This increases the overall coverage by 5%-10% (depending on coveragetype). Some modules are still not unittested at all, as HUnit is abetter choice for them.
Abstract instance running states into a list
This removes some manual checks from a few places in the code with asingle list defined once.
Fix unittests after instance tags addition
More hlint fixes
This makes (for now) the code hlint-clean. This is per se not a hugegain, but it allows easier tracking of regressions in style later(one-two new violations are easier to diagnose when not hidden among 20“known” ones).
Style change: camel-casing of unittests
Style change: node and instance attributes
This changes from a_b to aB in all node and instance attributes, tomatch the standard Haskell style. Also attributes that should have beencamel-cased but weren't were changed (e.g. plist → pList, pnode →pNode).
Turn on, and fix, more warnings
The Makefile was intented to be -Wall and not simply -W, but I missedthat. This enables more warnings and also enables -Werror (except forthe tests).
Brown bag fix: invert a test
During testing I used the test inversely to see it triggers correctly,and committed by mistake the inverted test. Fixing it.
Add support for building without curl
Since curl is not always needed (e.g. when only using luxi or lesslikely file backends only) and is also not always available, it isuseful for building without it. This of course disabled the RAPIbackend.
This patch changes ExtLoader to build with the ‘-cpp’ option which makes...
Test some cases for the cluster score computation
Add some more instance tests
This include instance text load tests.
Fix unittests
The recent OpResult and CPU values additions broke unittests.
Fix hlint-generated warnings
This big patch cleans up the code per hlint indications. Many removalsof extra parentheses, replacements of concat . map with concabtMap,extra dollar signs, eta reductions, etc. were performed.
The code still compiles and passes a couple of manual tests on sample...
Ensure consistent naming of the tools
This patch makes sure that all references to the name of the software isganeti-htools, not simply htools.
Add copyright/license information
This doc-patch adds copyright and license information to (hopefully) allneeded files.
tests: move the test declaration in QC.hs
This patch moves the test declaration into QC.hs, so that test.hs has tobe modified only when we add a new test category.
A simple test for Container.addTwo
Add some very trivial Instance tests
This is more of an exercise in QuickCheck than strong testing.
Finish removal of unused params from PeerMap
This completes the removal started earlier byt removeing the need topass the number of nodes to Node.buildPeers, which is now unused.
Add test infrastructure and initial tests
This patch adds a QuickCheck-based test infrastructure and initial testsbased on it. The PeerMap module has a 100% coverage ☺
Side-note: one has to read the source of QuickCheck to see how to use it(especially the Batch submodule), the docs are not enough…