[Kimchi-devel] [PATCH][Kimchi 6/6] Add test to check bootorder
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Wed Jul 13 16:30:38 UTC 2016
Also, update new entry on a test at test_model
Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
---
tests/test_model.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/tests/test_model.py b/tests/test_model.py
index 9a6a1aa..09ef995 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'))
+ 'access', 'persistent', 'bootorder'))
stats_keys = set(('cpu_utilization', 'mem_utilization',
'net_throughput', 'net_throughput_peak',
@@ -1124,6 +1124,19 @@ class ModelTests(unittest.TestCase):
self.assertEquals([], inst.vm_lookup(u'пeω-∨м')['users'])
self.assertEquals([], inst.vm_lookup(u'пeω-∨м')['groups'])
+ # change bootorder
+ b_order = ["hd", "network", "cdrom"]
+ inst.vm_update(u'пeω-∨м', {"bootorder": b_order})
+ self.assertEquals(b_order, inst.vm_lookup(u'пeω-∨м')['bootorder'])
+
+ # try to add empty list
+ self.assertRaises(OperationFailed, inst.vm_update, u'пeω-∨м',
+ {"bootorder": [""]})
+
+ # try to pass invalid parameter
+ self.assertRaises(OperationFailed, inst.vm_update, u'пeω-∨м',
+ {"bootorder": ["bla"]})
+
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