Reviewed-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
On 04/07/2016 03:47 PM, Ramon Medeiros wrote:
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
tests/test_model.py | 4 ++++
tests/test_template.py | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/test_model.py b/tests/test_model.py
index 9f5fe83..ca0e6f5 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -274,6 +274,10 @@ class ModelTests(unittest.TestCase):
inst.templates_create(tmpl_info)
rollback.prependDefer(inst.template_delete, tmpl_name)
+ # verify disk
+ tmpl = inst.template_lookup(tmpl_name)
+ self.assertEquals(vol_path, tmpl["disks"][0]["base"])
+
params = {'name': 'kimchi-vm',
'template':
'/plugins/kimchi/templates/img-tmpl'}
task = inst.vms_create(params)
diff --git a/tests/test_template.py b/tests/test_template.py
index 1b27130..a6e58d6 100644
--- a/tests/test_template.py
+++ b/tests/test_template.py
@@ -93,7 +93,7 @@ class TemplateTests(unittest.TestCase):
self.request('/plugins/kimchi/templates/test').read()
)
self.assertEquals(sorted(tmpl.keys()), sorted(keys))
-
+ self.assertEquals(t['source_media'], tmpl["cdrom"])
disk_keys = ['index', 'pool', 'size',
'format']
disk_pool_keys = ['name', 'type']
self.assertEquals(sorted(tmpl['disks'][0].keys()), sorted(disk_keys))