- Jan 27, 2011
-
-
Michael Hanselmann authored
Commit 70b0d2a2 broke unittests on Python 2.4 and 2.5. Turns out that Python 2.6 and above allow classes to be passed as custom test runners, whereas earlier versions don't. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 16, 2010
-
-
Michael Hanselmann authored
By enabling all log levels, we ensure all calls are fully evaluated. There was one case in the workerpool where a call to “logging.debug” was wrong, but not caught in unittests because debug logging was disabled. The optional environment variable “LOGTOSTDERR” can be set to write all log messages to stderr instead of /dev/null. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jul 29, 2010
-
-
Michael Hanselmann authored
A lot of assertions are used in Ganeti's code. Some unittests even check whether AssertionError is raised in some cases. Explicitely ensuring assertions are evaluated makes sure those tests don't fail and assertions are checked. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 14, 2010
-
-
Michael Hanselmann authored
While the name can be looked up in Makefile.am, this is useful when an automated test just hangs and needs to be killed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Nov 03, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 19, 2009
-
-
Michael Hanselmann authored
Commit d22b2999 broke the serializer unittests with certain versions of simplejson. This patch removes sort_keys again and implements a slightly more efficient way of detecting simplejson functionality. The serializer unittests no longer use a partially broken mock, but rather a function to convert all tuples to lists before comparing. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Sep 03, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Luca Bigliardi <shammash@google.com>
-
- Aug 25, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Feb 12, 2009
-
-
Guido Trotter authored
In the current Ganeti version when modifying /etc/hosts we mistakenly give it the permissions of the temporary file we create to define its content, which is by default 0600. This breaks most non-root applications, and thus must be corrected. This patch forces the mode to be 0644 (but we might decide to just use the mode of the previous /etc/hosts, if we want to be more polite against any eventual administrative choice). We also add a new assertFileMode() method for unit tests and actually check in the SetEtcHostsEntry and RemoveEtcHostsEntry tests that the mode is correct, to be sure not to reintroduce this bug again. Also, a FIXME is added in the original functions stating that it would be nice to use WriteFile+fn() rather than reimplementing its functionality again. Reviewed-by: iustinp
-
- Jan 20, 2009
-
-
Iustin Pop authored
This patch adds unified temporary file handling to the testutils.GanetiTestCase class, which adds easy creation and automated cleanup of temporary files. The patch allows a simpler handling in a couple of test cases but requires all child classes to call the parent setUp and tearDown methods. Reviewed-by: ultrotter
-
- Oct 20, 2008
-
-
Iustin Pop authored
Currently we have two methods in ganeti.bdev_unittest.py of computing the test data file name - and, of course, they don't give the same results. The patch moves the functions to compute the test file name and reading of its contents to the GanetiTestCase class in testutils, which allows running the tests from the command line as well. We also change assertFileContent to use utils.ReadFile. Reviewed-by: imsnah
-
- Feb 26, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Feb 14, 2008
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Oct 12, 2007
-
-
Michael Hanselmann authored
Reviewed-by: schreiberal
-
- Sep 13, 2007
-
-
Michael Hanselmann authored
Reviewed-by: iustinp
-
- Jul 16, 2007
-
-
Iustin Pop authored
-