Skip to content
Snippets Groups Projects
Commit b666f213 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

hv_xen: Test verifying hypervisor


Test success and failure.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 7610d884
No related branches found
No related tags found
No related merge requests found
......@@ -383,6 +383,16 @@ class _TestXenHypervisor(object):
self.assertFalse(os.path.exists(autocfgfile))
self.assertEqual(utils.ReadFile(cfgfile), "content")
def testVerify(self):
output = testutils.ReadTestData("xen-xm-info-4.0.1.txt")
hv = self._GetHv(run_cmd=compat.partial(self._SuccessCommand,
output))
self.assertTrue(hv.Verify() is None)
def testVerifyFailing(self):
hv = self._GetHv(run_cmd=self._FailingCommand)
self.assertTrue("failed:" in hv.Verify())
def _MakeTestClass(cls, cmd):
"""Makes a class for testing.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment