[Kimchi-devel] [PATCH][Kimchi 2/2] Add test to verify bootmenu and update old tests

Ramon Medeiros ramonn at linux.vnet.ibm.com
Thu Jul 14 20:31:54 UTC 2016


Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
---
 tests/test_mockmodel.py | 2 +-
 tests/test_model.py     | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/test_mockmodel.py b/tests/test_mockmodel.py
index 0db1ff2..43f6d07 100644
--- a/tests/test_mockmodel.py
+++ b/tests/test_mockmodel.py
@@ -163,7 +163,7 @@ class MockModelTests(unittest.TestCase):
 
         keys = set(('name', 'state', 'stats', 'uuid', 'memory', 'cpu_info',
                     'screenshot', 'icon', 'graphics', 'users', 'groups',
-                    'access', 'persistent', 'bootorder'))
+                    'access', 'persistent', 'bootorder', 'bootmenu'))
 
         stats_keys = set(('cpu_utilization', 'mem_utilization',
                           'net_throughput', 'net_throughput_peak',
diff --git a/tests/test_model.py b/tests/test_model.py
index 09ef995..68fafd4 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -118,7 +118,7 @@ class ModelTests(unittest.TestCase):
 
         keys = set(('name', 'state', 'stats', 'uuid', 'memory', 'cpu_info',
                     'screenshot', 'icon', 'graphics', 'users', 'groups',
-                    'access', 'persistent', 'bootorder'))
+                    'access', 'persistent', 'bootorder', 'bootmenu'))
 
         stats_keys = set(('cpu_utilization', 'mem_utilization',
                           'net_throughput', 'net_throughput_peak',
@@ -1137,6 +1137,12 @@ class ModelTests(unittest.TestCase):
             self.assertRaises(OperationFailed, inst.vm_update, u'пeω-∨м',
                               {"bootorder": ["bla"]})
 
+            # enable/disable bootmenu
+            inst.vm_update(u'пeω-∨м', {"bootmenu": True})
+            self.assertEquals("yes", inst.vm_lookup(u'пeω-∨м')['bootmenu'])
+            inst.vm_update(u'пeω-∨м', {"bootmenu": False})
+            self.assertEquals("no", inst.vm_lookup(u'пeω-∨м')['bootmenu'])
+
     def test_get_interfaces(self):
         inst = model.Model('test:///default',
                            objstore_loc=self.tmp_store)
-- 
2.5.5




More information about the Kimchi-devel mailing list