[Kimchi-devel] [PATCH 5/5] Add testcase for cdrom eject

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Tue Jun 3 07:20:42 UTC 2014


From: Royce Lv <lvroyce at linux.vnet.ibm.com>

Add cdrom eject testcase to make sure it works properly.

Signed-off-by: Royce Lv <lvroyce at 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




More information about the Kimchi-devel mailing list