From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Add cdrom eject testcase to make sure it works properly.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
tests/test_model.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/test_model.py b/tests/test_model.py
index b78b52e..142e4fc 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -318,6 +318,11 @@ class ModelTests(unittest.TestCase):
inst.vmstorage_update(vm_name, cdrom_dev, {'path': iso_path})
cdrom_info = inst.vmstorage_lookup(vm_name, cdrom_dev)
self.assertEquals(iso_path, cdrom_info['path'])
+
+ # eject cdrom
+ cdrom_dev = inst.vmstorage_eject(vm_name, cdrom_dev)
+ cdrom_info = inst.vmstorage_lookup(vm_name, cdrom_dev)
+ self.assertEquals('', cdrom_info['path'])
inst.vm_poweroff(vm_name)
# removing non existent cdrom
--
1.8.3.2