Skip to content
Snippets Groups Projects
  1. Jan 27, 2011
  2. Sep 16, 2010
  3. Jul 29, 2010
  4. Jan 14, 2010
  5. Nov 03, 2009
  6. Oct 19, 2009
  7. Sep 03, 2009
  8. Aug 25, 2009
  9. Feb 12, 2009
    • Guido Trotter's avatar
      Apply the right permissions to /etc/hosts · 9b977740
      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
      9b977740
  10. Jan 20, 2009
    • Iustin Pop's avatar
      Unify some unittest functions · 51596eb2
      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
      51596eb2
  11. Oct 20, 2008
    • Iustin Pop's avatar
      Generalize the reading of test file data · 149a5439
      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
      149a5439
  12. Feb 26, 2008
  13. Feb 14, 2008
  14. Oct 12, 2007
  15. Sep 13, 2007
  16. Jul 16, 2007
Loading