Add two tests for hypervisor constants.

Signed-off-by: Michael Hanselmann <[email protected]>
---
 test/py/ganeti.constants_unittest.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/py/ganeti.constants_unittest.py 
b/test/py/ganeti.constants_unittest.py
index 3723e04..9b7edcd 100755
--- a/test/py/ganeti.constants_unittest.py
+++ b/test/py/ganeti.constants_unittest.py
@@ -90,6 +90,14 @@ class TestConstants(unittest.TestCase):
     self.assertFalse(constants.JOBS_PENDING - constants.JOB_STATUS_ALL)
     self.assertFalse(constants.JOBS_FINALIZED - constants.JOB_STATUS_ALL)
 
+  def testDefaultsForAllHypervisors(self):
+    self.assertEqual(frozenset(constants.HVC_DEFAULTS.keys()),
+                     constants.HYPER_TYPES)
+
+  def testDefaultHypervisor(self):
+    self.assertTrue(constants.DEFAULT_ENABLED_HYPERVISOR in
+                    constants.HYPER_TYPES)
+
 
 class TestExportedNames(unittest.TestCase):
   _VALID_NAME_RE = re.compile(r"^[A-Z][A-Z0-9_]+$")
-- 
1.8.1

-- 
You received this message because you are subscribed to the Google Groups 
"ganeti-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to