History | View | Annotate | Download (4.1 kB)
testutils: Print name of test program before running it
While the name can be looked up in Makefile.am, thisis useful when an automated test just hangs and needsto be killed.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Ignore log messages in unittests
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix serializer unittests
Commit d22b29997cd broke the serializer unittests with certainversions of simplejson. This patch removes sort_keys againand implements a slightly more efficient way of detectingsimplejson functionality. The serializer unittests no longer...
Add simple unittest for hooks documentation
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Run unittests in a temporary directory
Apply the right permissions to /etc/hosts
In the current Ganeti version when modifying /etc/hosts we mistakenlygive it the permissions of the temporary file we create to define itscontent, which is by default 0600. This breaks most non-rootapplications, and thus must be corrected. This patch forces the mode to...
Unify some unittest functions
This patch adds unified temporary file handling to thetestutils.GanetiTestCase class, which adds easy creation and automatedcleanup of temporary files.
The patch allows a simpler handling in a couple of test cases butrequires all child classes to call the parent setUp and tearDown...
Generalize the reading of test file data
Currently we have two methods in ganeti.bdev_unittest.py of computingthe test data file name - and, of course, they don't give the sameresults.
The patch moves the functions to compute the test file name and reading...
Split GanetiUnitTest into testutils.py
Reviewed-by: iustinp