Revision 57270b2d test/py/ganeti.hypervisor.hv_xen_unittest.py

b/test/py/ganeti.hypervisor.hv_xen_unittest.py
366 366
                           "", "This command failed", None,
367 367
                           NotImplemented, NotImplemented)
368 368

  
369
  def testReadingNonExistentConfigFile(self):
370
    hv = self._GetHv()
371

  
372
    try:
373
      hv._ReadConfigFile("inst15780.example.com")
374
    except errors.HypervisorError, err:
375
      self.assertTrue(str(err).startswith("Failed to load Xen config file:"))
376
    else:
377
      self.fail("Exception was not raised")
378

  
369 379
  def testRemovingAutoConfigFile(self):
370 380
    name = "inst8206.example.com"
371 381
    cfgfile = utils.PathJoin(self.tmpdir, name)

Also available in: Unified diff