Change in vdsm[master]: v2v: test get_ova_info with via tar input

shavivi at redhat.com shavivi at redhat.com
Sun Dec 13 10:36:12 UTC 2015


Shahar Havivi has uploaded a new change for review.

Change subject: v2v: test get_ova_info with via tar input
......................................................................

v2v: test get_ova_info with via tar input

Change-Id: I3237198dcba3b668c0954b6e335d4293dc5e5703
Signed-off-by: Shahar Havivi <shaharh at redhat.com>
---
M tests/v2vTests.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/50376/1

diff --git a/tests/v2vTests.py b/tests/v2vTests.py
index ee81f60..8c97483 100644
--- a/tests/v2vTests.py
+++ b/tests/v2vTests.py
@@ -19,6 +19,7 @@
 
 from collections import namedtuple
 from StringIO import StringIO
+import tarfile
 import uuid
 
 import libvirt
@@ -352,6 +353,7 @@
 
     def testGetOvaInfo(self):
         with namedTemporaryDir() as base:
+            ovapath = os.path.join(base, 'testvm.ova')
             ovfpath = os.path.join(base, 'testvm.ovf')
             ovf = read_ovf('test')
 
@@ -361,6 +363,12 @@
             vm = v2v.get_ova_info(base)
             self._checkOvaInfoOutput(vm['vmList'])
 
+            # ova as tar file
+            with tarfile.open(ovapath, 'w') as tar:
+                tar.add(ovfpath, arcname='testvm.ovf')
+            vm = v2v.get_ova_info(ovapath)
+            self._checkOvaInfoOutput(vm['vmList'])
+
     def _checkOvaInfoOutput(self, vm):
         self.assertEquals(vm['vmName'], 'First')
         self.assertEquals(vm['memSize'], 2048)


-- 
To view, visit https://gerrit.ovirt.org/50376
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3237198dcba3b668c0954b6e335d4293dc5e5703
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>


More information about the vdsm-patches mailing list